summaryrefslogtreecommitdiffstats
path: root/src/lockdown.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lockdown.c')
-rw-r--r--src/lockdown.c5
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 */