summaryrefslogtreecommitdiff
path: root/admin.c
diff options
context:
space:
mode:
authorꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2020-07-18 18:32:05 +0800
committerꦌ ꦫꦶ ꦏ꧀ꦦꦿ ꦧ ꦮ ꦑ ꦩ ꦭ꧀ <erik@darapsa.co.id>2020-07-18 18:32:05 +0800
commit5bf19c2fd85ec6284398394abb761bea2511c33b (patch)
treefbff69c85e58688981b07886f483b8f2c9225a59 /admin.c
parent345d1a62fcf5ac82189196c74b3d5e40c6d08dff (diff)
Admin memory release
Diffstat (limited to 'admin.c')
-rw-r--r--admin.c6
1 files changed, 6 insertions, 0 deletions
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;
}