From e0c861c0acf30ceffeded22c176b40cb65210818 Mon Sep 17 00:00:00 2001 From: Douglas Clowes Date: Thu, 29 Nov 2012 10:33:19 +1100 Subject: [PATCH] potential memory leak --- lld.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lld.c b/lld.c index c5e7f3dd..53fc61d5 100644 --- a/lld.c +++ b/lld.c @@ -89,6 +89,7 @@ static int ListInit(int List, int ItemSize) */ Tmp = NODE_MALLOC(List); if (NULL == Tmp) { + Tmp = ListControl[List].first; NODE_FREE(Tmp); /* no need to cause memory leaks */ ListControl[List].first = NULL; /* or other errors */ return ERR_MEMORY; /* even if we're in trouble ... */