Add and use OPENSSL_zalloc
[openssl.git] / crypto / asn1 / p5_pbe.c
index a65b65945211775acdb94cb92d7e78d4b13db8a0..cc91fad53b2aa1440d4bbbcbcd093621eb07872d 100644 (file)
@@ -58,7 +58,7 @@
  */
 
 #include <stdio.h>
-#include "cryptlib.h"
+#include "internal/cryptlib.h"
 #include <openssl/asn1t.h>
 #include <openssl/x509.h>
 #include <openssl/rand.h>
@@ -116,8 +116,7 @@ int PKCS5_pbe_set0_algor(X509_ALGOR *algor, int alg, int iter,
         return 1;
 
  err:
-    if (pbe != NULL)
-        PBEPARAM_free(pbe);
+    PBEPARAM_free(pbe);
     ASN1_STRING_free(pbe_str);
     return 0;
 }