summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/store
diff options
context:
space:
mode:
authortedu <>2014-05-25 20:28:50 +0000
committertedu <>2014-05-25 20:28:50 +0000
commit896ee758458e7d17dd2014f065480b5085e6be10 (patch)
tree7a0bda660a181d082657a078f67d9146fbd212c2 /src/lib/libcrypto/store
parent339be6db68ff6f687a26e3c86aae9664fb3d0187 (diff)
downloadopenbsd-896ee758458e7d17dd2014f065480b5085e6be10.tar.gz
openbsd-896ee758458e7d17dd2014f065480b5085e6be10.tar.bz2
openbsd-896ee758458e7d17dd2014f065480b5085e6be10.zip
calloc instead of malloc/memset. from Benjamin Baier
Diffstat (limited to 'src/lib/libcrypto/store')
-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