summaryrefslogtreecommitdiffstats
path: root/filescan-utils.c
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2017-12-08 20:11:34 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2017-12-08 20:15:53 +0100
commit7db4aac29d251134dea5ec4425ef87c970f6fec0 (patch)
tree6b5a93777981abfb66a30e9c49f26e38be47a966 /filescan-utils.c
parente0c00c4b88e0d67bb352f22623caa4c306205bc5 (diff)
Fix memory leak
Change-Id: Ia02a639ea9210ed7961a88c91ff9e4cd1a732416 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'filescan-utils.c')
-rw-r--r--filescan-utils.c3
1 files changed, 2 insertions, 1 deletions
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);
}