summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorShane Lontis <shane.lontis@oracle.com>2019-04-07 11:45:36 +1000
committerPauli <paul.dale@oracle.com>2019-04-08 10:21:22 +1000
commitdf09b6b5f9088db10ef13dd71999db9b282b8d1a (patch)
tree56d65bef2d669b1cbb7beae1ce0ec40ace2e574f /apps
parent61d7045bd234d82b689ad314bfe57bfc478358fb (diff)
coverity resource leak fixes in apps/pkeyutl
Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/8691)
Diffstat (limited to 'apps')
-rw-r--r--apps/pkeyutl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/pkeyutl.c b/apps/pkeyutl.c
index 7f1e6213e6..c8cac0d676 100644
--- a/apps/pkeyutl.c
+++ b/apps/pkeyutl.c
@@ -688,7 +688,7 @@ static int do_raw_keyop(int pkey_op, EVP_PKEY_CTX *ctx,
if (filesize < 0) {
BIO_printf(bio_err,
"Error: unable to determine file size for oneshot operation\n");
- return rv;
+ goto end;
}
mbuf = app_malloc(filesize, "oneshot sign/verify buffer");
switch(pkey_op) {
@@ -717,7 +717,6 @@ static int do_raw_keyop(int pkey_op, EVP_PKEY_CTX *ctx,
}
break;
}
- OPENSSL_free(mbuf);
goto end;
}
@@ -767,6 +766,7 @@ static int do_raw_keyop(int pkey_op, EVP_PKEY_CTX *ctx,
}
end:
+ OPENSSL_free(mbuf);
EVP_MD_CTX_free(mctx);
return rv;
}