diff options
-rw-r--r-- | common/eurephia_admin_common.c | 11 | ||||
-rw-r--r-- | common/eurephia_admin_common.h | 3 |
2 files changed, 13 insertions, 1 deletions
diff --git a/common/eurephia_admin_common.c b/common/eurephia_admin_common.c index 3b02fe1..8b62779 100644 --- a/common/eurephia_admin_common.c +++ b/common/eurephia_admin_common.c @@ -130,5 +130,14 @@ void _eAdminFreeUSERINFO_func(eurephiaUSERINFO *p) { free_nullsafe(p->deactivated); free_nullsafe(p->last_accessed); p->next = NULL; - free_nullsafe(p); + free(p); +} + +void _eAdminFreeUSERLIST_func(eurephiaUSERLIST *p) { + if( p == NULL ) { + return; + } + + eAdminFreeUSERINFO(p->users); + free(p); } diff --git a/common/eurephia_admin_common.h b/common/eurephia_admin_common.h index 450e700..aa6a989 100644 --- a/common/eurephia_admin_common.h +++ b/common/eurephia_admin_common.h @@ -119,4 +119,7 @@ eurephiaUSERINFO *eAdminPopulateUSERINFO(int uid, const char *uname, const char void _eAdminFreeUSERINFO_func(eurephiaUSERINFO *); #define eAdminFreeUSERINFO(x) { _eAdminFreeUSERINFO_func(x); x = NULL; } +void _eAdminFreeUSERLIST_func(eurephiaUSERLIST *); +#define eAdminFreeUSERLIST(x) { _eAdminFreeUSERLIST_func(x); x = NULL; } + #endif /* !EUREPHIA_ADMIN_COMMON_H_ */ |