summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;
}