summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/store/str_meth.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/store/str_meth.c')
-rw-r--r--src/lib/libcrypto/store/str_meth.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/lib/libcrypto/store/str_meth.c b/src/lib/libcrypto/store/str_meth.c
index 8944824618..0401aaa129 100644
--- a/src/lib/libcrypto/store/str_meth.c
+++ b/src/lib/libcrypto/store/str_meth.c
@@ -62,13 +62,11 @@
62 62
63STORE_METHOD *STORE_create_method(char *name) 63STORE_METHOD *STORE_create_method(char *name)
64 { 64 {
65 STORE_METHOD *store_method = (STORE_METHOD *)malloc(sizeof(STORE_METHOD)); 65 STORE_METHOD *store_method = calloc(1, sizeof(STORE_METHOD));
66 66
67 if (store_method) 67 if (store_method)
68 {
69 memset(store_method, 0, sizeof(*store_method));
70 store_method->name = BUF_strdup(name); 68 store_method->name = BUF_strdup(name);
71 } 69
72 return store_method; 70 return store_method;
73 } 71 }
74 72