Change-Id: I823d77c9a16584d7eb04b4c5c8d0e242f0d7c865
if (n <= 0)
return 0;
- char **keys = alloca(sizeof(char *) * n);
int total = n + c->n_exclude_paths;
int n_added = 0;
c->exclude_paths = realloc(c->exclude_paths, sizeof(char *) * total);
- if (!keys || !c->exclude_paths)
+ if (!c->exclude_paths)
goto err_oom;
- keys = iniparser_getseckeys(ini, EXCLUDEPATHS_SECTION);
+ // keys are destroyed by iniparser
+ char **keys = iniparser_getseckeys(ini, EXCLUDEPATHS_SECTION);
if (!keys)
goto err_oom;