From 25aaa98aa249d26391c1994d2de449562c8b8b99 Mon Sep 17 00:00:00 2001 From: Rich Salz Date: Fri, 1 May 2015 14:37:16 -0400 Subject: free NULL cleanup -- coda After the finale, the "real" final part. :) Do a recursive grep with "-B1 -w [a-zA-Z0-9_]*_free" to see if any of the preceeding lines are an "if NULL" check that can be removed. Reviewed-by: Tim Hudson --- apps/s_cb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'apps/s_cb.c') diff --git a/apps/s_cb.c b/apps/s_cb.c index 1f2d371952..13a3a25652 100644 --- a/apps/s_cb.c +++ b/apps/s_cb.c @@ -1202,6 +1202,9 @@ static int ssl_excert_prepend(SSL_EXCERT **pexc) void ssl_excert_free(SSL_EXCERT *exc) { SSL_EXCERT *curr; + + if (!exc) + return; while (exc) { X509_free(exc->cert); EVP_PKEY_free(exc->key); @@ -1311,8 +1314,7 @@ int args_excert(int opt, SSL_EXCERT **pexc) err: ERR_print_errors(bio_err); - if (exc) - ssl_excert_free(exc); + ssl_excert_free(exc); *pexc = NULL; return 0; } -- cgit v1.2.3