summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2018-12-10 15:07:33 +0100
committerRomain Forlot <romain.forlot@iot.bzh>2018-12-11 17:42:12 +0000
commit329d1158804c5dffb8e77670a0cb3f4f38650d55 (patch)
treec732712095a883978f048ad9df4252304f4127cf /src
parent61f3565dd9443fc77b39f9a8515db3672fb243e2 (diff)
little memleak fix.
Change-Id: I9288ef2f2f9d37de993164dd454fc75b69f44abf Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'src')
-rw-r--r--src/aft.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/aft.c b/src/aft.c
index 9500368..19510af 100644
--- a/src/aft.c
+++ b/src/aft.c
@@ -251,6 +251,7 @@ int afbBindingEntry(afb_api_t apiHandle) {
char *dirList, *afTestRootDir, *path;
const char *envDirList = NULL, *configPath = NULL, *bindingRootDir = NULL;
json_object *settings = afb_api_settings(apiHandle), *bpath = NULL;
+ CtlConfigT *ctrlConfig = NULL;
AFB_API_DEBUG(apiHandle, "Controller in afbBindingEntry");
@@ -290,6 +291,8 @@ int afbBindingEntry(afb_api_t apiHandle) {
return ERROR;
}
+ ctrlConfig = CtrlLoadConfigFile(apiHandle, configPath);
free(afTestRootDir);
- return CtrlCreateApi(apiHandle, CtrlLoadConfigFile(apiHandle, configPath));
+ free(dirList);
+ return CtrlCreateApi(apiHandle, ctrlConfig);
}