From 72823091c232311c17b22afffd2d74824a11f371 Mon Sep 17 00:00:00 2001 From: Paul Bakker Date: Mon, 24 Jun 2013 19:32:04 +0200 Subject: [PATCH] Removed redundant free()s (cherry picked from commit 1fc7dfe2e2c26621b55fcf837a4fba241aba8f06) --- library/x509parse.c | 9 --------- 1 file changed, 9 deletions(-) diff --git a/library/x509parse.c b/library/x509parse.c index f26b433e9..74671a00b 100644 --- a/library/x509parse.c +++ b/library/x509parse.c @@ -2330,10 +2330,7 @@ int x509parse_key( rsa_context *rsa, const unsigned char *key, size_t keylen, return( ret ); } else if( ret != POLARSSL_ERR_PEM_NO_HEADER_FOOTER_PRESENT ) - { - pem_free( &pem ); return( ret ); - } ret = pem_read_buffer( &pem, "-----BEGIN PRIVATE KEY-----", @@ -2351,10 +2348,7 @@ int x509parse_key( rsa_context *rsa, const unsigned char *key, size_t keylen, return( ret ); } else if( ret != POLARSSL_ERR_PEM_NO_HEADER_FOOTER_PRESENT ) - { - pem_free( &pem ); return( ret ); - } ret = pem_read_buffer( &pem, "-----BEGIN ENCRYPTED PRIVATE KEY-----", @@ -2373,10 +2367,7 @@ int x509parse_key( rsa_context *rsa, const unsigned char *key, size_t keylen, return( ret ); } else if( ret != POLARSSL_ERR_PEM_NO_HEADER_FOOTER_PRESENT ) - { - pem_free( &pem ); return( ret ); - } #else ((void) pwd); ((void) pwdlen);