diff options
author | David Sommerseth <dazo@users.sourceforge.net> | 2008-12-06 03:17:19 +0100 |
---|---|---|
committer | David Sommerseth <dazo@users.sourceforge.net> | 2008-12-06 03:17:19 +0100 |
commit | 19a442fd9054529de731abad84852183be8ed115 (patch) | |
tree | 6021e439636897439087c8db08591e01f2534865 /common | |
parent | 4f60f36b2c29d94d074aeb451aed8dc65340c0e3 (diff) | |
download | eurephia-19a442fd9054529de731abad84852183be8ed115.tar.gz eurephia-19a442fd9054529de731abad84852183be8ed115.tar.xz eurephia-19a442fd9054529de731abad84852183be8ed115.zip |
Added free function eurephiaUSERLIST structs. Added possible valgrind issue.
Diffstat (limited to 'common')
-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_ */ |