diff options
author | Simo Sorce <simo@redhat.com> | 2015-08-30 14:28:32 -0400 |
---|---|---|
committer | Simo Sorce <simo@redhat.com> | 2015-08-30 14:28:32 -0400 |
commit | 3e4f466d5224af50c6789894cca459aa4504ef47 (patch) | |
tree | 4ccd53f35fb614e4b1369631a1554a33f888cd9e | |
parent | f206c24dfcf9bbc70d8551aaf6794d50d67feaa0 (diff) | |
download | mod_auth_gssapi-3e4f466d5224af50c6789894cca459aa4504ef47.tar.gz mod_auth_gssapi-3e4f466d5224af50c6789894cca459aa4504ef47.tar.xz mod_auth_gssapi-3e4f466d5224af50c6789894cca459aa4504ef47.zip |
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 <simo@redhat.com>
-rw-r--r-- | src/crypto.c | 6 |
1 files changed, 1 insertions, 5 deletions
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; |