]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - crypto/store/str_meth.c
Use safer sizeof variant in malloc
[thirdparty/openssl.git] / crypto / store / str_meth.c
index 781b1603e35fe9930a2b465c1f1386a6dd3a0ff4..74878197f9d24e07d15e26fa80a4a43e3c9f1526 100644 (file)
@@ -63,7 +63,7 @@
 
 STORE_METHOD *STORE_create_method(char *name)
 {
-    STORE_METHOD *store_method = OPENSSL_malloc(sizeof(STORE_METHOD));
+    STORE_METHOD *store_method = OPENSSL_malloc(sizeof(*store_method));
 
     if (store_method) {
         memset(store_method, 0, sizeof(*store_method));