summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/store/str_lib.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/store/str_lib.c')
-rw-r--r--src/lib/libcrypto/store/str_lib.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/lib/libcrypto/store/str_lib.c b/src/lib/libcrypto/store/str_lib.c
index e92dc1f51c..a451e9cb74 100644
--- a/src/lib/libcrypto/store/str_lib.c
+++ b/src/lib/libcrypto/store/str_lib.c
@@ -112,7 +112,7 @@ STORE *STORE_new_method(const STORE_METHOD *method)
112 return NULL; 112 return NULL;
113 } 113 }
114 114
115 ret=(STORE *)OPENSSL_malloc(sizeof(STORE)); 115 ret=(STORE *)malloc(sizeof(STORE));
116 if (ret == NULL) 116 if (ret == NULL)
117 { 117 {
118 STOREerr(STORE_F_STORE_NEW_METHOD,ERR_R_MALLOC_FAILURE); 118 STOREerr(STORE_F_STORE_NEW_METHOD,ERR_R_MALLOC_FAILURE);
@@ -185,7 +185,7 @@ void STORE_free(STORE *store)
185 if (store->meth->clean) 185 if (store->meth->clean)
186 store->meth->clean(store); 186 store->meth->clean(store);
187 CRYPTO_free_ex_data(CRYPTO_EX_INDEX_STORE, store, &store->ex_data); 187 CRYPTO_free_ex_data(CRYPTO_EX_INDEX_STORE, store, &store->ex_data);
188 OPENSSL_free(store); 188 free(store);
189 } 189 }
190 190
191int STORE_ctrl(STORE *store, int cmd, long i, void *p, void (*f)(void)) 191int STORE_ctrl(STORE *store, int cmd, long i, void *p, void (*f)(void))
@@ -1227,7 +1227,7 @@ int STORE_delete_arbitrary(STORE *s, OPENSSL_ITEM attributes[],
1227 1227
1228STORE_OBJECT *STORE_OBJECT_new(void) 1228STORE_OBJECT *STORE_OBJECT_new(void)
1229 { 1229 {
1230 STORE_OBJECT *object = OPENSSL_malloc(sizeof(STORE_OBJECT)); 1230 STORE_OBJECT *object = malloc(sizeof(STORE_OBJECT));
1231 if (object) memset(object, 0, sizeof(STORE_OBJECT)); 1231 if (object) memset(object, 0, sizeof(STORE_OBJECT));
1232 return object; 1232 return object;
1233 } 1233 }
@@ -1253,7 +1253,7 @@ void STORE_OBJECT_free(STORE_OBJECT *data)
1253 BUF_MEM_free(data->data.arbitrary); 1253 BUF_MEM_free(data->data.arbitrary);
1254 break; 1254 break;
1255 } 1255 }
1256 OPENSSL_free(data); 1256 free(data);
1257 } 1257 }
1258 1258
1259IMPLEMENT_STACK_OF(STORE_OBJECT*) 1259IMPLEMENT_STACK_OF(STORE_OBJECT*)
@@ -1280,7 +1280,7 @@ struct STORE_attr_info_st
1280 1280
1281STORE_ATTR_INFO *STORE_ATTR_INFO_new(void) 1281STORE_ATTR_INFO *STORE_ATTR_INFO_new(void)
1282 { 1282 {
1283 return (STORE_ATTR_INFO *)OPENSSL_malloc(sizeof(STORE_ATTR_INFO)); 1283 return (STORE_ATTR_INFO *)malloc(sizeof(STORE_ATTR_INFO));
1284 } 1284 }
1285static void STORE_ATTR_INFO_attr_free(STORE_ATTR_INFO *attrs, 1285static void STORE_ATTR_INFO_attr_free(STORE_ATTR_INFO *attrs,
1286 STORE_ATTR_TYPES code) 1286 STORE_ATTR_TYPES code)
@@ -1320,7 +1320,7 @@ int STORE_ATTR_INFO_free(STORE_ATTR_INFO *attrs)
1320 STORE_ATTR_TYPES i; 1320 STORE_ATTR_TYPES i;
1321 for(i = 0; i++ < STORE_ATTR_TYPE_NUM;) 1321 for(i = 0; i++ < STORE_ATTR_TYPE_NUM;)
1322 STORE_ATTR_INFO_attr_free(attrs, i); 1322 STORE_ATTR_INFO_attr_free(attrs, i);
1323 OPENSSL_free(attrs); 1323 free(attrs);
1324 } 1324 }
1325 return 1; 1325 return 1;
1326 } 1326 }
@@ -1474,7 +1474,7 @@ int STORE_ATTR_INFO_modify_cstr(STORE_ATTR_INFO *attrs, STORE_ATTR_TYPES code,
1474 } 1474 }
1475 if (ATTR_IS_SET(attrs,code)) 1475 if (ATTR_IS_SET(attrs,code))
1476 { 1476 {
1477 OPENSSL_free(attrs->values[code].cstring); 1477 free(attrs->values[code].cstring);
1478 attrs->values[code].cstring = NULL; 1478 attrs->values[code].cstring = NULL;
1479 CLEAR_ATTRBIT(attrs, code); 1479 CLEAR_ATTRBIT(attrs, code);
1480 } 1480 }
@@ -1491,7 +1491,7 @@ int STORE_ATTR_INFO_modify_sha1str(STORE_ATTR_INFO *attrs, STORE_ATTR_TYPES code
1491 } 1491 }
1492 if (ATTR_IS_SET(attrs,code)) 1492 if (ATTR_IS_SET(attrs,code))
1493 { 1493 {
1494 OPENSSL_free(attrs->values[code].sha1string); 1494 free(attrs->values[code].sha1string);
1495 attrs->values[code].sha1string = NULL; 1495 attrs->values[code].sha1string = NULL;
1496 CLEAR_ATTRBIT(attrs, code); 1496 CLEAR_ATTRBIT(attrs, code);
1497 } 1497 }
@@ -1508,7 +1508,7 @@ int STORE_ATTR_INFO_modify_dn(STORE_ATTR_INFO *attrs, STORE_ATTR_TYPES code,
1508 } 1508 }
1509 if (ATTR_IS_SET(attrs,code)) 1509 if (ATTR_IS_SET(attrs,code))
1510 { 1510 {
1511 OPENSSL_free(attrs->values[code].dn); 1511 free(attrs->values[code].dn);
1512 attrs->values[code].dn = NULL; 1512 attrs->values[code].dn = NULL;
1513 CLEAR_ATTRBIT(attrs, code); 1513 CLEAR_ATTRBIT(attrs, code);
1514 } 1514 }
@@ -1525,7 +1525,7 @@ int STORE_ATTR_INFO_modify_number(STORE_ATTR_INFO *attrs, STORE_ATTR_TYPES code,
1525 } 1525 }
1526 if (ATTR_IS_SET(attrs,code)) 1526 if (ATTR_IS_SET(attrs,code))
1527 { 1527 {
1528 OPENSSL_free(attrs->values[code].number); 1528 free(attrs->values[code].number);
1529 attrs->values[code].number = NULL; 1529 attrs->values[code].number = NULL;
1530 CLEAR_ATTRBIT(attrs, code); 1530 CLEAR_ATTRBIT(attrs, code);
1531 } 1531 }
@@ -1541,7 +1541,7 @@ void *STORE_parse_attrs_start(OPENSSL_ITEM *attributes)
1541 if (attributes) 1541 if (attributes)
1542 { 1542 {
1543 struct attr_list_ctx_st *context = 1543 struct attr_list_ctx_st *context =
1544 (struct attr_list_ctx_st *)OPENSSL_malloc(sizeof(struct attr_list_ctx_st)); 1544 (struct attr_list_ctx_st *)malloc(sizeof(struct attr_list_ctx_st));
1545 if (context) 1545 if (context)
1546 context->attributes = attributes; 1546 context->attributes = attributes;
1547 else 1547 else
@@ -1650,7 +1650,7 @@ int STORE_parse_attrs_end(void *handle)
1650#if 0 1650#if 0
1651 OPENSSL_ITEM *attributes = context->attributes; 1651 OPENSSL_ITEM *attributes = context->attributes;
1652#endif 1652#endif
1653 OPENSSL_free(context); 1653 free(context);
1654 return 1; 1654 return 1;
1655 } 1655 }
1656 STOREerr(STORE_F_STORE_PARSE_ATTRS_END, ERR_R_PASSED_NULL_PARAMETER); 1656 STOREerr(STORE_F_STORE_PARSE_ATTRS_END, ERR_R_PASSED_NULL_PARAMETER);