Core: allow NULL argument to stored_namemap_free().
@@ -72,10 +72,12 @@ static void stored_namemap_free(void *vnamemap)
{
OSSL_NAMEMAP *namemap = vnamemap;
+ if (namemap != NULL) {
/* Pretend it isn't stored, or ossl_namemap_free() will do nothing */
namemap->stored = 0;
ossl_namemap_free(namemap);
}
+}
static const OPENSSL_CTX_METHOD stored_namemap_method = {
stored_namemap_new,
