diff options
Diffstat (limited to 'src/debugserver.c')
| -rw-r--r-- | src/debugserver.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/debugserver.c b/src/debugserver.c index 37b54de..e653a8e 100644 --- a/src/debugserver.c +++ b/src/debugserver.c | |||
| @@ -153,7 +153,7 @@ LIBIMOBILEDEVICE_API debugserver_error_t debugserver_client_receive(debugserver_ | |||
| 153 | return debugserver_client_receive_with_timeout(client, data, size, received, 1000); | 153 | return debugserver_client_receive_with_timeout(client, data, size, received, 1000); |
| 154 | } | 154 | } |
| 155 | 155 | ||
| 156 | LIBIMOBILEDEVICE_API debugserver_error_t debugserver_command_new(const char* name, int argc, const char* argv[], debugserver_command_t* command) | 156 | LIBIMOBILEDEVICE_API debugserver_error_t debugserver_command_new(const char* name, int argc, char* argv[], debugserver_command_t* command) |
| 157 | { | 157 | { |
| 158 | int i; | 158 | int i; |
| 159 | debugserver_command_t tmp = (debugserver_command_t) malloc(sizeof(struct debugserver_command_private)); | 159 | debugserver_command_t tmp = (debugserver_command_t) malloc(sizeof(struct debugserver_command_private)); |
| @@ -541,13 +541,16 @@ LIBIMOBILEDEVICE_API debugserver_error_t debugserver_client_set_environment_hex_ | |||
| 541 | return DEBUGSERVER_E_INVALID_ARG; | 541 | return DEBUGSERVER_E_INVALID_ARG; |
| 542 | 542 | ||
| 543 | debugserver_error_t result = DEBUGSERVER_E_UNKNOWN_ERROR; | 543 | debugserver_error_t result = DEBUGSERVER_E_UNKNOWN_ERROR; |
| 544 | const char* env_arg[] = { env, NULL }; | 544 | char* env_tmp = strdup(env); |
| 545 | char* env_arg[2] = { env_tmp, NULL }; | ||
| 545 | 546 | ||
| 546 | debugserver_command_t command = NULL; | 547 | debugserver_command_t command = NULL; |
| 547 | debugserver_command_new("QEnvironmentHexEncoded:", 1, env_arg, &command); | 548 | debugserver_command_new("QEnvironmentHexEncoded:", 1, env_arg, &command); |
| 548 | result = debugserver_client_send_command(client, command, response); | 549 | result = debugserver_client_send_command(client, command, response); |
| 549 | debugserver_command_free(command); | 550 | debugserver_command_free(command); |
| 550 | 551 | ||
| 552 | free(env_tmp); | ||
| 553 | |||
| 551 | return result; | 554 | return result; |
| 552 | } | 555 | } |
| 553 | 556 | ||
