summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Martin Szulecki2014-03-21 02:09:02 +0100
committerGravatar Martin Szulecki2014-03-21 02:09:02 +0100
commit977121600631291098378896887e2f738768e801 (patch)
treea47812fc8f54d5e9b5210fd0414445176c32f736 /src
parent1331f6baa1799e41003aa812c0d1bf36193535ea (diff)
downloadlibimobiledevice-977121600631291098378896887e2f738768e801.tar.gz
libimobiledevice-977121600631291098378896887e2f738768e801.tar.bz2
lockdown: Plug memory leak due to missing free of public_key
Diffstat (limited to 'src')
-rw-r--r--src/lockdown.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lockdown.c b/src/lockdown.c
index 4cc9d84..e7fa813 100644
--- a/src/lockdown.c
+++ b/src/lockdown.c
@@ -884,6 +884,7 @@ static lockdownd_error_t pair_record_generate(lockdownd_client_t client, plist_t
userpref_read_system_buid(&system_buid);
plist_dict_set_item(*pair_record, USERPREF_SYSTEM_BUID_KEY, plist_new_string(system_buid));
+ /* set HostID */
pair_record_set_host_id(*pair_record, host_id);
if (ret != LOCKDOWN_E_SUCCESS) {
@@ -895,6 +896,8 @@ leave:
free(host_id);
if (system_buid)
free(system_buid);
+ if (public_key.data)
+ free(public_key.data);
return ret;
}