diff options
Diffstat (limited to 'crypto/store/str_meth.c')
-rw-r--r-- | crypto/store/str_meth.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/crypto/store/str_meth.c b/crypto/store/str_meth.c index 74878197f9..c030198841 100644 --- a/crypto/store/str_meth.c +++ b/crypto/store/str_meth.c @@ -63,12 +63,10 @@ STORE_METHOD *STORE_create_method(char *name) { - STORE_METHOD *store_method = OPENSSL_malloc(sizeof(*store_method)); + STORE_METHOD *store_method = OPENSSL_zalloc(sizeof(*store_method)); - if (store_method) { - memset(store_method, 0, sizeof(*store_method)); + if (store_method) store_method->name = BUF_strdup(name); - } return store_method; } |