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:
Rich Salz
2015-05-01 10:02:07 -04:00
parent 33fbca83dc
commit b548a1f11c
173 changed files with 509 additions and 1012 deletions

View File

@@ -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);

View File

@@ -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;
}