diff options
Diffstat (limited to 'src/lib/libcrypto/store/str_mem.c')
-rw-r--r-- | src/lib/libcrypto/store/str_mem.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/libcrypto/store/str_mem.c b/src/lib/libcrypto/store/str_mem.c index 4eb707c5a9..3f32bcb8d0 100644 --- a/src/lib/libcrypto/store/str_mem.c +++ b/src/lib/libcrypto/store/str_mem.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: str_mem.c,v 1.8 2014/06/12 15:49:30 deraadt Exp $ */ | 1 | /* $OpenBSD: str_mem.c,v 1.9 2014/07/09 16:59:33 miod Exp $ */ |
2 | /* Written by Richard Levitte (richard@levitte.org) for the OpenSSL | 2 | /* Written by Richard Levitte (richard@levitte.org) for the OpenSSL |
3 | * project 2003. | 3 | * project 2003. |
4 | */ | 4 | */ |
@@ -224,15 +224,15 @@ static void * | |||
224 | mem_list_start(STORE *s, STORE_OBJECT_TYPES type, OPENSSL_ITEM attributes[], | 224 | mem_list_start(STORE *s, STORE_OBJECT_TYPES type, OPENSSL_ITEM attributes[], |
225 | OPENSSL_ITEM parameters[]) | 225 | OPENSSL_ITEM parameters[]) |
226 | { | 226 | { |
227 | struct mem_ctx_st *context = malloc(sizeof(struct mem_ctx_st)); | 227 | struct mem_ctx_st *context; |
228 | void *attribute_context = NULL; | 228 | void *attribute_context = NULL; |
229 | STORE_ATTR_INFO *attrs = NULL; | 229 | STORE_ATTR_INFO *attrs = NULL; |
230 | 230 | ||
231 | context = calloc(1, sizeof(struct mem_ctx_st)); | ||
231 | if (!context) { | 232 | if (!context) { |
232 | STOREerr(STORE_F_MEM_LIST_START, ERR_R_MALLOC_FAILURE); | 233 | STOREerr(STORE_F_MEM_LIST_START, ERR_R_MALLOC_FAILURE); |
233 | return 0; | 234 | return 0; |
234 | } | 235 | } |
235 | memset(context, 0, sizeof(struct mem_ctx_st)); | ||
236 | 236 | ||
237 | attribute_context = STORE_parse_attrs_start(attributes); | 237 | attribute_context = STORE_parse_attrs_start(attributes); |
238 | if (!attribute_context) { | 238 | if (!attribute_context) { |