From 977121600631291098378896887e2f738768e801 Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Fri, 21 Mar 2014 02:09:02 +0100 Subject: lockdown: Plug memory leak due to missing free of public_key --- src/lockdown.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') 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; } -- cgit v1.1-32-gdbae