X509_VERIFY_PARAM_free: Check param for NULL
authorKurt Roeckx <kurt@roeckx.be>
Sat, 11 Apr 2015 15:08:38 +0000 (17:08 +0200)
committerKurt Roeckx <kurt@roeckx.be>
Sat, 11 Apr 2015 18:35:13 +0000 (20:35 +0200)
Reviewed-by: Viktor Dukhovni <openssl-users@dukhovni.org>
(cherry picked from commit f49baeff50d0be9c8d86aed6fb4a08841aa3da41)

crypto/x509/x509_vpm.c

index 322239401e004b04477522abaa4240e5fd3f3691..9f7647fac22bb8bd8ad6e95fbeea67ea7876cc34 100644 (file)
@@ -189,6 +189,8 @@ X509_VERIFY_PARAM *X509_VERIFY_PARAM_new(void)
 
 void X509_VERIFY_PARAM_free(X509_VERIFY_PARAM *param)
 {
+    if (param == NULL)
+        return;
     x509_verify_param_zero(param);
     OPENSSL_free(param->id);
     OPENSSL_free(param);