free NULL cleanup 11
[openssl.git] / crypto / cmac / cmac.c
index 19018480f2e1849b075dc8bf0839206649d68c64..5e8fdc399bb7ed59d21ff9879df3036da19725eb 100644 (file)
@@ -115,6 +115,8 @@ EVP_CIPHER_CTX *CMAC_CTX_get0_cipher_ctx(CMAC_CTX *ctx)
 
 void CMAC_CTX_free(CMAC_CTX *ctx)
 {
+    if (!ctx)
+        return;
     CMAC_CTX_cleanup(ctx);
     OPENSSL_free(ctx);
 }