diff options
| author | 2013-07-16 21:25:14 +0200 | |
|---|---|---|
| committer | 2013-07-16 21:25:14 +0200 | |
| commit | b70438d116b0da8519f7772f09c5b563b69c07ae (patch) | |
| tree | 2e68859fd4c2387e26f99d17e75eae9859541337 /src | |
| parent | 153fbe15c702d9c36551d84ee8cb25c4884fd701 (diff) | |
| download | libimobiledevice-b70438d116b0da8519f7772f09c5b563b69c07ae.tar.gz libimobiledevice-b70438d116b0da8519f7772f09c5b563b69c07ae.tar.bz2 | |
Fix memory leaks in instproxy_client_get_path_for_bundle_identifier()
Diffstat (limited to 'src')
| -rw-r--r-- | src/installation_proxy.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/installation_proxy.c b/src/installation_proxy.c index e18c9c4..ee27d97 100644 --- a/src/installation_proxy.c +++ b/src/installation_proxy.c | |||
| @@ -808,6 +808,8 @@ instproxy_error_t instproxy_client_get_path_for_bundle_identifier(instproxy_clie | |||
| 808 | plist_array_append_item(return_attributes, plist_new_string("CFBundleExecutable")); | 808 | plist_array_append_item(return_attributes, plist_new_string("CFBundleExecutable")); |
| 809 | plist_array_append_item(return_attributes, plist_new_string("Path")); | 809 | plist_array_append_item(return_attributes, plist_new_string("Path")); |
| 810 | instproxy_client_options_add(client_opts, "ReturnAttributes", return_attributes, NULL); | 810 | instproxy_client_options_add(client_opts, "ReturnAttributes", return_attributes, NULL); |
| 811 | plist_free(return_attributes); | ||
| 812 | return_attributes = NULL; | ||
| 811 | 813 | ||
| 812 | // query device for list of apps | 814 | // query device for list of apps |
| 813 | instproxy_error_t ierr = instproxy_browse(client, client_opts, &apps); | 815 | instproxy_error_t ierr = instproxy_browse(client, client_opts, &apps); |
| @@ -870,5 +872,13 @@ instproxy_error_t instproxy_client_get_path_for_bundle_identifier(instproxy_clie | |||
| 870 | 872 | ||
| 871 | *path = ret; | 873 | *path = ret; |
| 872 | 874 | ||
| 875 | if (path_str) { | ||
| 876 | free(path_str); | ||
| 877 | } | ||
| 878 | |||
| 879 | if (exec_str) { | ||
| 880 | free(exec_str); | ||
| 881 | } | ||
| 882 | |||
| 873 | return INSTPROXY_E_SUCCESS; | 883 | return INSTPROXY_E_SUCCESS; |
| 874 | } | 884 | } |
