From b70438d116b0da8519f7772f09c5b563b69c07ae Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Tue, 16 Jul 2013 21:25:14 +0200 Subject: Fix memory leaks in instproxy_client_get_path_for_bundle_identifier() --- src/installation_proxy.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/installation_proxy.c') 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; } -- cgit v1.1-32-gdbae