mirror of
https://github.com/Cisco-Talos/clamav.git
synced 2025-10-19 10:23:17 +00:00
bb12471: Fix clamdscan memory leak on exit
This commit is contained in:
parent
f5d465a864
commit
1c683bf09a
2 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue