free null cleanup finale
Don't check for NULL before calling OPENSSL_free Reviewed-by: Richard Levitte <levitte@openssl.org>
This commit is contained in:
@@ -239,10 +239,8 @@ char **argv;
|
||||
BIO_printf(bio_err, "bytes written:%8ld\n", BIO_number_written(out));
|
||||
}
|
||||
end:
|
||||
if (strbuf != NULL)
|
||||
OPENSSL_free(strbuf);
|
||||
if (buff != NULL)
|
||||
OPENSSL_free(buff);
|
||||
OPENSSL_free(strbuf);
|
||||
OPENSSL_free(buff);
|
||||
BIO_free(in);
|
||||
BIO_free(out);
|
||||
BIO_free(benc);
|
||||
|
@@ -1548,12 +1548,9 @@ static int engine_md_cleanup(EVP_MD_CTX *ctx)
|
||||
|
||||
ZEN_MD_DATA *zen_md_data = (ZEN_MD_DATA *)ctx->md_data;
|
||||
|
||||
if (zen_md_data->HashBuffer != NULL) {
|
||||
OPENSSL_free(zen_md_data->HashBuffer);
|
||||
zen_md_data->HashBufferSize = 0;
|
||||
ctx->md_data = NULL;
|
||||
}
|
||||
|
||||
OPENSSL_free(zen_md_data->HashBuffer);
|
||||
zen_md_data->HashBufferSize = 0;
|
||||
ctx->md_data = NULL;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user