diff options
| author | 2014-10-07 16:46:38 +0200 | |
|---|---|---|
| committer | 2014-10-07 16:46:38 +0200 | |
| commit | 04ba663cfefe1acd20ce303c1d0357fc6f44da78 (patch) | |
| tree | 715935f23d5b43de52e931cbf0b16c05660d947e /tools | |
| parent | 7e6a8d077fb4205b94f075184f771bd686ffa8fc (diff) | |
| download | libimobiledevice-04ba663cfefe1acd20ce303c1d0357fc6f44da78.tar.gz libimobiledevice-04ba663cfefe1acd20ce303c1d0357fc6f44da78.tar.bz2 | |
idevicedebug: Fix small memory leak
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/idevicedebug.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/tools/idevicedebug.c b/tools/idevicedebug.c index 850a4b1..dcdb6b6 100644 --- a/tools/idevicedebug.c +++ b/tools/idevicedebug.c | |||
| @@ -328,12 +328,17 @@ int main(int argc, char *argv[]) | |||
| 328 | instproxy_client_get_path_for_bundle_identifier(instproxy_client, bundle_identifier, &path); | 328 | instproxy_client_get_path_for_bundle_identifier(instproxy_client, bundle_identifier, &path); |
| 329 | instproxy_client_free(instproxy_client); | 329 | instproxy_client_free(instproxy_client); |
| 330 | instproxy_client = NULL; | 330 | instproxy_client = NULL; |
| 331 | if (container && plist_get_node_type(container) == PLIST_STRING) { | 331 | |
| 332 | plist_get_string_val(container, &working_directory); | 332 | if (container) { |
| 333 | debug_info("working_directory: %s\n", working_directory); | 333 | if (plist_get_node_type(container) == PLIST_STRING) { |
| 334 | } else { | 334 | plist_get_string_val(container, &working_directory); |
| 335 | fprintf(stderr, "Could not determine container path for bundle identifier %s.\n", bundle_identifier); | 335 | debug_info("working_directory: %s\n", working_directory); |
| 336 | goto cleanup; | 336 | plist_free(container); |
| 337 | } else { | ||
| 338 | plist_free(container); | ||
| 339 | fprintf(stderr, "Could not determine container path for bundle identifier %s.\n", bundle_identifier); | ||
| 340 | goto cleanup; | ||
| 341 | } | ||
| 337 | } | 342 | } |
| 338 | 343 | ||
| 339 | /* start and connect to debugserver */ | 344 | /* start and connect to debugserver */ |
