Fix ctx initialization

Signed-off-by: Janos SUTO <sj@acts.hu>
This commit is contained in:
Janos SUTO 2018-10-17 07:26:46 +00:00
parent 2d0beab92a
commit afa6fc7a7c

View File

@ -138,7 +138,7 @@ int retrieve_file_from_archive(char *filename, int mode, char **buffer, FILE *de
#if OPENSSL_VERSION_NUMBER < 0x10100000L #if OPENSSL_VERSION_NUMBER < 0x10100000L
EVP_CIPHER_CTX ctx; EVP_CIPHER_CTX ctx;
#else #else
EVP_CIPHER_CTX *ctx; EVP_CIPHER_CTX *ctx=NULL;
#endif #endif
@ -227,7 +227,7 @@ CLEANUP:
#if OPENSSL_VERSION_NUMBER < 0x10100000L #if OPENSSL_VERSION_NUMBER < 0x10100000L
EVP_CIPHER_CTX_cleanup(&ctx); EVP_CIPHER_CTX_cleanup(&ctx);
#else #else
EVP_CIPHER_CTX_free(ctx); if(ctx) EVP_CIPHER_CTX_free(ctx);
#endif #endif
return 0; return 0;