From 345d1a62fcf5ac82189196c74b3d5e40c6d08dff 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: Thu, 16 Jul 2020 10:58:36 +0800 Subject: Implement member memory release --- member.c | 92 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 92 insertions(+) diff --git a/member.c b/member.c index c9e62b4..971bd26 100644 --- a/member.c +++ b/member.c @@ -178,4 +178,96 @@ void icclient_member_changepassword(const char *password_old, const char *passwo void icclient_member_logout(icclient_member *member) { request(NULL, NULL, NULL, "%s", "logout"); + if (member->username) + free(member->username); + if (member->usernick) + free(member->usernick); + if (member->password) + free(member->password); + if (member->expiration) + free(member->expiration); + if (member->acl) + free(member->acl); + if (member->mod_time) + free(member->mod_time); + if (member->s_nickname) + free(member->s_nickname); + if (member->company) + free(member->company); + if (member->fname) + free(member->fname); + if (member->lname) + free(member->lname); + if (member->address1) + free(member->address1); + if (member->address2) + free(member->address2); + if (member->address3) + free(member->address3); + if (member->city) + free(member->city); + if (member->state) + free(member->state); + if (member->zip) + free(member->zip); + if (member->country) + free(member->country); + if (member->phone_day) + free(member->phone_day); + if (member->mv_shipmode) + free(member->mv_shipmode); + if (member->b_nickname) + free(member->b_nickname); + if (member->b_fname) + free(member->b_fname); + if (member->b_lname) + free(member->b_lname); + if (member->b_company) + free(member->b_company); + if (member->b_address1) + free(member->b_address1); + if (member->b_address2) + free(member->b_address2); + if (member->b_address3) + free(member->b_address3); + if (member->b_city) + free(member->b_city); + if (member->b_state) + free(member->b_state); + if (member->b_zip) + free(member->b_zip); + if (member->b_country) + free(member->b_country); + if (member->b_phone) + free(member->b_phone); + if (member->p_nickname) + free(member->p_nickname); + if (member->email) + free(member->email); + if (member->fax) + free(member->fax); + if (member->phone_night) + free(member->phone_night); + if (member->address_book) + free(member->address_book); + if (member->accounts) + free(member->accounts); + if (member->preferences) + free(member->preferences); + if (member->carts) + free(member->carts); + if (member->owner) + free(member->owner); + if (member->file_acl) + free(member->file_acl); + if (member->db_acl) + free(member->db_acl); + if (member->mail_list) + free(member->mail_list); + if (member->credit_limit) + free(member->credit_limit); + if (member->price_level) + free(member->price_level); + free(member); + member = NULL; } -- cgit v1.2.3