summaryrefslogtreecommitdiff
path: root/lib/x509
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2015-06-03 13:28:59 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2015-06-03 13:28:59 +0200
commit87b6c71243442540c3ad1577631b3b4ec96fe074 (patch)
treeb025f1b9a7419b9167a9c318b0298e2dc85f8fc4 /lib/x509
parenta89bfa9f38e08b02a0d6b16dd6602cf31ab2a14b (diff)
downloadgnutls-87b6c71243442540c3ad1577631b3b4ec96fe074.tar.gz
pkcs7: addressed memory leaks
Diffstat (limited to 'lib/x509')
-rw-r--r--lib/x509/pkcs7.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/x509/pkcs7.c b/lib/x509/pkcs7.c
index bc3211996c..e84079f91c 100644
--- a/lib/x509/pkcs7.c
+++ b/lib/x509/pkcs7.c
@@ -866,7 +866,8 @@ int gnutls_pkcs7_verify_direct(gnutls_pkcs7_t pkcs7,
snprintf(root, sizeof(root), "signerInfos.?%u", idx + 1);
ret = figure_pkcs7_sigdata(pkcs7, root, data, info.algo, &sigdata);
if (ret < 0) {
- return gnutls_assert_val(ret);
+ gnutls_assert();
+ goto cleanup;
}
ret = gnutls_x509_crt_verify_data2(signer, info.algo, flags, &sigdata, &info.sig);
@@ -1072,7 +1073,8 @@ int gnutls_pkcs7_verify(gnutls_pkcs7_t pkcs7,
snprintf(root, sizeof(root), "signerInfos.?%u", idx + 1);
ret = figure_pkcs7_sigdata(pkcs7, root, data, info.algo, &sigdata);
if (ret < 0) {
- return gnutls_assert_val(ret);
+ gnutls_assert();
+ goto cleanup;
}
signer = find_signer(pkcs7, tl, vdata, vdata_size, &info);