summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lockdown.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lockdown.c b/src/lockdown.c
index a0bc2f4..536207f 100644
--- a/src/lockdown.c
+++ b/src/lockdown.c
@@ -269,7 +269,7 @@ lockdownd_error_t lockdownd_client_free(lockdownd_client_t client)
lockdownd_stop_session(client, client->session_id);
}
- if (client->parent) {
+ if (!client->ssl_enabled) {
lockdownd_goodbye(client);
}
@@ -1173,7 +1173,7 @@ lockdownd_error_t lockdownd_enter_recovery(lockdownd_client_t client)
*/
lockdownd_error_t lockdownd_goodbye(lockdownd_client_t client)
{
- if (!client)
+ if (!client || !client->parent)
return LOCKDOWN_E_INVALID_ARG;
lockdownd_error_t ret = LOCKDOWN_E_UNKNOWN_ERROR;