summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2013-07-16 21:25:14 +0200
committerGravatar Martin Szulecki2013-07-16 21:25:14 +0200
commitb70438d116b0da8519f7772f09c5b563b69c07ae (patch)
tree2e68859fd4c2387e26f99d17e75eae9859541337 /src
parent153fbe15c702d9c36551d84ee8cb25c4884fd701 (diff)
downloadlibimobiledevice-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.c10
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
plist_array_append_item(return_attributes, plist_new_string("CFBundleExecutable"));
plist_array_append_item(return_attributes, plist_new_string("Path"));
instproxy_client_options_add(client_opts, "ReturnAttributes", return_attributes, NULL);
+ plist_free(return_attributes);
+ return_attributes = NULL;
// query device for list of apps
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
*path = ret;
+ if (path_str) {
+ free(path_str);
+ }
+
+ if (exec_str) {
+ free(exec_str);
+ }
+
return INSTPROXY_E_SUCCESS;
}