summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/idevicedebug.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/idevicedebug.c b/tools/idevicedebug.c
index c8772ed..1d49e07 100644
--- a/tools/idevicedebug.c
+++ b/tools/idevicedebug.c
@@ -372,8 +372,9 @@ int main(int argc, char *argv[])
372 372
373 /* set maximum packet size */ 373 /* set maximum packet size */
374 debug_info("Setting maximum packet size..."); 374 debug_info("Setting maximum packet size...");
375 const char* packet_size[2] = {"1024", NULL}; 375 char* packet_size[2] = {strdup("1024"), NULL};
376 debugserver_command_new("QSetMaxPacketSize:", 1, packet_size, &command); 376 debugserver_command_new("QSetMaxPacketSize:", 1, packet_size, &command);
377 free(packet_size[0]);
377 dres = debugserver_client_send_command(debugserver_client, command, &response); 378 dres = debugserver_client_send_command(debugserver_client, command, &response);
378 debugserver_command_free(command); 379 debugserver_command_free(command);
379 command = NULL; 380 command = NULL;
@@ -388,7 +389,7 @@ int main(int argc, char *argv[])
388 389
389 /* set working directory */ 390 /* set working directory */
390 debug_info("Setting working directory..."); 391 debug_info("Setting working directory...");
391 const char* working_dir[2] = {working_directory, NULL}; 392 char* working_dir[2] = {working_directory, NULL};
392 debugserver_command_new("QSetWorkingDir:", 1, working_dir, &command); 393 debugserver_command_new("QSetWorkingDir:", 1, working_dir, &command);
393 dres = debugserver_client_send_command(debugserver_client, command, &response); 394 dres = debugserver_client_send_command(debugserver_client, command, &response);
394 debugserver_command_free(command); 395 debugserver_command_free(command);
@@ -509,6 +510,9 @@ cleanup:
509 free(environment); 510 free(environment);
510 } 511 }
511 512
513 if (working_directory)
514 free(working_directory);
515
512 if (path) 516 if (path)
513 free(path); 517 free(path);
514 518