bb12471: Fix clamdscan memory leak on exit

This commit is contained in:
Micah Snyder (micasnyd) 2020-03-13 09:36:21 -07:00
parent f5d465a864
commit 1c683bf09a
2 changed files with 2 additions and 0 deletions

View file

@ -83,6 +83,7 @@ int main(int argc, char **argv)
if ((clamdopts = optparse(optget(opts, "config-file")->strarg, 0, NULL, 1, OPT_CLAMD, 0, NULL)) == NULL) {
logg("!Can't parse clamd configuration file %s\n", optget(opts, "config-file")->strarg);
optfree(opts);
return 2;
}

View file

@ -119,6 +119,7 @@ int main(int argc, char **argv)
clamdopts = optparse(optget(opts, "config-file")->strarg, 0, NULL, 1, OPT_CLAMD, 0, NULL);
if (clamdopts == NULL) {
logg("!Clamonacc: can't parse clamd configuration file %s\n", optget(opts, "config-file")->strarg);
optfree((struct optstruct *)opts);
return 2;
}
ctx->clamdopts = clamdopts;