Commit 2f6b105a authored by Hannes Domani's avatar Hannes Domani Committed by Rémi Denis-Courmont

config: fix memory leak

Signed-off-by: default avatarRémi Denis-Courmont <remi@remlab.net>
parent 8e083895
...@@ -387,6 +387,7 @@ static ssize_t config_ListModules (const char *cap, char ***restrict values, ...@@ -387,6 +387,7 @@ static ssize_t config_ListModules (const char *cap, char ***restrict values,
if (n <= 0) if (n <= 0)
{ {
*values = *texts = NULL; *values = *texts = NULL;
module_list_free (list);
return n; return n;
} }
...@@ -408,6 +409,7 @@ static ssize_t config_ListModules (const char *cap, char ***restrict values, ...@@ -408,6 +409,7 @@ static ssize_t config_ListModules (const char *cap, char ***restrict values,
*values = vals; *values = vals;
*texts = txts; *texts = txts;
module_list_free (list);
return n + 2; return n + 2;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment