diff options
| author | 2014-03-21 02:09:02 +0100 | |
|---|---|---|
| committer | 2014-03-21 02:09:02 +0100 | |
| commit | 977121600631291098378896887e2f738768e801 (patch) | |
| tree | a47812fc8f54d5e9b5210fd0414445176c32f736 | |
| parent | 1331f6baa1799e41003aa812c0d1bf36193535ea (diff) | |
| download | libimobiledevice-977121600631291098378896887e2f738768e801.tar.gz libimobiledevice-977121600631291098378896887e2f738768e801.tar.bz2 | |
lockdown: Plug memory leak due to missing free of public_key
| -rw-r--r-- | src/lockdown.c | 3 |
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 | |||
| 884 | userpref_read_system_buid(&system_buid); | 884 | userpref_read_system_buid(&system_buid); |
| 885 | plist_dict_set_item(*pair_record, USERPREF_SYSTEM_BUID_KEY, plist_new_string(system_buid)); | 885 | plist_dict_set_item(*pair_record, USERPREF_SYSTEM_BUID_KEY, plist_new_string(system_buid)); |
| 886 | 886 | ||
| 887 | /* set HostID */ | ||
| 887 | pair_record_set_host_id(*pair_record, host_id); | 888 | pair_record_set_host_id(*pair_record, host_id); |
| 888 | 889 | ||
| 889 | if (ret != LOCKDOWN_E_SUCCESS) { | 890 | if (ret != LOCKDOWN_E_SUCCESS) { |
| @@ -895,6 +896,8 @@ leave: | |||
| 895 | free(host_id); | 896 | free(host_id); |
| 896 | if (system_buid) | 897 | if (system_buid) |
| 897 | free(system_buid); | 898 | free(system_buid); |
| 899 | if (public_key.data) | ||
| 900 | free(public_key.data); | ||
| 898 | 901 | ||
| 899 | return ret; | 902 | return ret; |
| 900 | } | 903 | } |
