From 3bdabd90d18afba156e4523e5e0ed8fd09133c4d Mon Sep 17 00:00:00 2001 From: Andy Ragusa Date: Thu, 17 Mar 2022 11:36:53 -0700 Subject: [PATCH] Changed free to MPOOL_FREE 'new' is allocated by mpool, so should be freed by the mpool free function. --- libclamav/matcher-ac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libclamav/matcher-ac.c b/libclamav/matcher-ac.c index 3b22b5c268..5e5071f454 100644 --- a/libclamav/matcher-ac.c +++ b/libclamav/matcher-ac.c @@ -2668,7 +2668,7 @@ cl_error_t cli_ac_addsig(struct cli_matcher *root, const char *virname, const ch hexnewsz = strlen(hexsig) + 1; if (!(hexnew = (char *)cli_calloc(1, hexnewsz))) { - free(new); + MPOOL_FREE(root->mempool, new); free(hexcpy); return CL_EMEM; }