From 8940c4125501cc7e28b38c00620c463499333dca Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 9 Aug 2007 13:23:17 +0000 Subject: fixed a potential memory leak in modules.c, again, this could not happen in current code --- modules.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'modules.c') diff --git a/modules.c b/modules.c index 6e4d0395..18a7cdd9 100644 --- a/modules.c +++ b/modules.c @@ -67,6 +67,8 @@ static rsRetVal moduleConstruct(modInfo_t **pThis) */ static void moduleDestruct(modInfo_t *pThis) { + if(pThis->pszName != NULL) + free(pThis->pszName); free(pThis); } @@ -163,7 +165,7 @@ modInfo_t *omodGetNxt(modInfo_t *pThis) /* Add an already-loaded module to the module linked list. This function does - * anything that is needed to fully initialize the module. + * everything needed to fully initialize the module. */ rsRetVal doModInit(rsRetVal (*modInit)(int, int*, rsRetVal(**)(), rsRetVal(*)()), uchar *name) { -- cgit