From: Simo Sorce Date: Sun, 30 Aug 2015 18:28:32 +0000 (-0400) Subject: Fix incorrect free() usage X-Git-Tag: v1.3.1~9 X-Git-Url: http://www.project-moonshot.org/gitweb/?p=mod_auth_gssapi.git;a=commitdiff_plain;h=3e4f466d5224af50c6789894cca459aa4504ef47;ds=sidebyside Fix incorrect free() usage This code has been changed to use apr pools for memory allocation, so the error path is wrong as free() is not called on malloc()ed memory anymore. Remove the calls to free(), the mempool is clean up by callers. Signed-off-by: Simo Sorce --- diff --git a/src/crypto.c b/src/crypto.c index 07c078c..1983a55 100644 --- a/src/crypto.c +++ b/src/crypto.c @@ -72,11 +72,7 @@ apr_status_t SEAL_KEY_CREATE(apr_pool_t *p, struct seal_key **skey, ret = 0; done: - if (ret) { - free(n->ekey); - free(n->hkey); - free(n); - } else { + if (ret == 0) { *skey = n; } return ret;