summaryrefslogtreecommitdiffstats
path: root/demos
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2015-05-01 16:02:07 +0200
committerRich Salz <rsalz@openssl.org>2015-05-01 16:02:07 +0200
commitb548a1f11c06ccdfa4f52a539912d22d77ee309e (patch)
tree37ff8792ddf09e4805aa3ba76b805923d3c52734 /demos
parentFix some typo's, silence warnings. (diff)
downloadopenssl-b548a1f11c06ccdfa4f52a539912d22d77ee309e.tar.xz
openssl-b548a1f11c06ccdfa4f52a539912d22d77ee309e.zip
free null cleanup finale
Don't check for NULL before calling OPENSSL_free Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'demos')
-rw-r--r--demos/b64.c6
-rw-r--r--demos/engines/zencod/hw_zencod.c9
2 files changed, 5 insertions, 10 deletions
diff --git a/demos/b64.c b/demos/b64.c
index 2fa4e980ce..c01107f4a0 100644
--- a/demos/b64.c
+++ b/demos/b64.c
@@ -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);
diff --git a/demos/engines/zencod/hw_zencod.c b/demos/engines/zencod/hw_zencod.c
index d675ace926..0b72217465 100644
--- a/demos/engines/zencod/hw_zencod.c
+++ b/demos/engines/zencod/hw_zencod.c
@@ -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;
}