From 714907df681a87be7af4b17cd540e50ebf82aa8a Mon Sep 17 00:00:00 2001 From: Romain Forlot Date: Fri, 8 Dec 2017 20:11:34 +0100 Subject: Fix memory leak Change-Id: Ia02a639ea9210ed7961a88c91ff9e4cd1a732416 Signed-off-by: Romain Forlot --- filescan-utils.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'filescan-utils.c') diff --git a/filescan-utils.c b/filescan-utils.c index a20179c..8b70d69 100644 --- a/filescan-utils.c +++ b/filescan-utils.c @@ -88,9 +88,10 @@ PUBLIC json_object* ScanForConfig (const char* searchPath, CtlScanDirModeT mode, } if (count == 0) { json_object_put (responseJ); + free(dirList); return NULL; } - + free(dirList); return (responseJ); } -- cgit 1.2.3-korg