summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Bryan Forbes2010-05-13 22:13:13 +0200
committerGravatar Martin Szulecki2010-05-13 22:15:07 +0200
commita4f14a777733fe85edbf3c482c2c0ffbda865949 (patch)
treeb45781d2d4e36d8fa35395322205feac62e81755
parent3548bb06c3d1eb54a3ec7db142ad5fe90683e72b (diff)
downloadlibimobiledevice-a4f14a777733fe85edbf3c482c2c0ffbda865949.tar.gz
libimobiledevice-a4f14a777733fe85edbf3c482c2c0ffbda865949.tar.bz2
Plug some memory leaks in lockdownd due to missing free() calls
-rw-r--r--src/lockdown.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lockdown.c b/src/lockdown.c
index 0623469..bb6aa49 100644
--- a/src/lockdown.c
+++ b/src/lockdown.c
@@ -189,8 +189,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);
@@ -1233,6 +1235,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 */