summaryrefslogtreecommitdiffstats
path: root/apps/verify.c
diff options
context:
space:
mode:
authorRich Salz <rsalz@openssl.org>2015-04-30 17:33:59 -0400
committerRich Salz <rsalz@openssl.org>2015-04-30 17:33:59 -0400
commit222561fe8ef510f336417a666f69f81ddc9b8fe4 (patch)
tree70bc6af70550022bc7b7af45bd3c6d64d7fc2680 /apps/verify.c
parent2ace745022f5af0709297e96eb0b0829c87c4291 (diff)
free NULL cleanup 5a
Don't check for NULL before calling a free routine. This gets X509_.*free: x509_name_ex_free X509_policy_tree_free X509_VERIFY_PARAM_free X509_STORE_free X509_STORE_CTX_free X509_PKEY_free X509_OBJECT_free_contents X509_LOOKUP_free X509_INFO_free Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'apps/verify.c')
-rw-r--r--apps/verify.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/apps/verify.c b/apps/verify.c
index 1faca9675e..f4e18f0535 100644
--- a/apps/verify.c
+++ b/apps/verify.c
@@ -221,10 +221,8 @@ int verify_main(int argc, char **argv)
}
end:
- if (vpm)
- X509_VERIFY_PARAM_free(vpm);
- if (store != NULL)
- X509_STORE_free(store);
+ X509_VERIFY_PARAM_free(vpm);
+ X509_STORE_free(store);
sk_X509_pop_free(untrusted, X509_free);
sk_X509_pop_free(trusted, X509_free);
sk_X509_CRL_pop_free(crls, X509_CRL_free);
@@ -283,8 +281,7 @@ static int check(X509_STORE *ctx, char *file,
}
sk_X509_pop_free(chain, X509_free);
}
- if (x != NULL)
- X509_free(x);
+ X509_free(x);
return (ret);
}