Avoid leaks after errors in freebsd config handler

Freeing allocated memory in an error flow. Currently this would
most likely not occure but a safeguard for future changes.
This commit is contained in:
Björn Svensson 2022-02-11 16:26:02 +01:00
parent 2445361818
commit 24a9ac3341
1 changed files with 1 additions and 0 deletions

View File

@ -191,6 +191,7 @@ freebsd_conf_handler(struct ff_config *cfg, const char *section,
} }
} else { } else {
fprintf(stderr, "freebsd conf section[%s] error\n", section); fprintf(stderr, "freebsd conf section[%s] error\n", section);
free(newconf);
return 0; return 0;
} }