From 5bf19c2fd85ec6284398394abb761bea2511c33b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=20=EA=A6=AB=EA=A6=B6=20=EA=A6=8F=EA=A7=80?= =?UTF-8?q?=EA=A6=A6=EA=A6=BF=20=EA=A6=A7=20=EA=A6=AE=20=EA=A6=91=20?= =?UTF-8?q?=EA=A6=A9=20=EA=A6=AD=EA=A7=80?= Date: Sat, 18 Jul 2020 18:32:05 +0800 Subject: Admin memory release --- admin.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'admin.c') diff --git a/admin.c b/admin.c index f0c5d49..7cb161b 100644 --- a/admin.c +++ b/admin.c @@ -21,4 +21,10 @@ icclient_admin *icclient_admin_login(const char *username, const char *password, void icclient_admin_logout(icclient_admin *admin) { request(NULL, NULL, NULL, "%s", "admin/login"); + if (admin->name) + free(admin->name); + if (admin->username) + free(admin->username); + free(admin); + admin = NULL; } -- cgit v1.2.3