diff options
author | Bryan Forbes | 2010-05-13 22:13:13 +0200 |
---|---|---|
committer | Martin Szulecki | 2010-05-13 22:13:13 +0200 |
commit | 6a1f93a003bb93c33687f2e8f6fcd68ab733527d (patch) | |
tree | a7c6d2a3a2e855dcbe6207a005de15610b321943 /src | |
parent | ab2d81850108277a6c0d3e50828ec9ed33bde425 (diff) | |
download | libimobiledevice-6a1f93a003bb93c33687f2e8f6fcd68ab733527d.tar.gz libimobiledevice-6a1f93a003bb93c33687f2e8f6fcd68ab733527d.tar.bz2 |
Plug some memory leaks in lockdownd due to missing free() calls
Diffstat (limited to 'src')
-rw-r--r-- | src/lockdown.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lockdown.c b/src/lockdown.c index 11f3c85..0d92b5d 100644 --- a/src/lockdown.c +++ b/src/lockdown.c @@ -194,8 +194,10 @@ lockdownd_error_t lockdownd_client_free(lockdownd_client_t client) return LOCKDOWN_E_INVALID_ARG; lockdownd_error_t ret = LOCKDOWN_E_UNKNOWN_ERROR; - if (client->session_id) + if (client->session_id) { lockdownd_stop_session(client, client->session_id); + free(client->session_id); + } if (client->parent) { lockdownd_goodbye(client); @@ -1238,6 +1240,7 @@ lockdownd_error_t lockdownd_start_session(lockdownd_client_t client, const char /* if we have a running session, stop current one first */ if (client->session_id) { lockdownd_stop_session(client, client->session_id); + free(client->session_id); } /* setup request plist */ |