diff options
author | Simon Josefsson <simon@josefsson.org> | 2005-12-08 21:54:02 +0000 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2005-12-08 21:54:02 +0000 |
commit | d2f9cfad72d0a1971581cd1fca443e5cf4237d96 (patch) | |
tree | bca0080b8be72b54979c79ed87304beb7c3611d2 | |
parent | 33bf7d7f7ff0906aafebf5af749fd7f4245dcf8c (diff) | |
download | gnutls-d2f9cfad72d0a1971581cd1fca443e5cf4237d96.tar.gz |
Fix mem leaks.
Remove unused variable.
-rw-r--r-- | lib/x509/pkcs12.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/x509/pkcs12.c b/lib/x509/pkcs12.c index a1abbc0b4e..57fd6985b1 100644 --- a/lib/x509/pkcs12.c +++ b/lib/x509/pkcs12.c @@ -113,6 +113,8 @@ _decode_pkcs12_auth_safe (ASN1_TYPE pkcs12, ASN1_TYPE * authen_safe, if (authen_safe) *authen_safe = c2; + else + asn1_delete_structure (&c2); return 0; @@ -600,7 +602,6 @@ gnutls_pkcs12_get_bag (gnutls_pkcs12_t pkcs12, char root2[64]; char oid[128]; char counter[MAX_INT_DIGITS]; - gnutls_datum_t tmp = { NULL, 0 }; if (pkcs12 == NULL) { @@ -665,13 +666,12 @@ gnutls_pkcs12_get_bag (gnutls_pkcs12_t pkcs12, if (result < 0) { gnutls_assert (); - return result; + goto cleanup; } - return 0; + result = 0; cleanup: - _gnutls_free_datum (&tmp); if (c2) asn1_delete_structure (&c2); return result; |