From 9f9f46ff2d30ff87a6a4f8c2af491ea1aa92fbb2 Mon Sep 17 00:00:00 2001 From: "Kaleb S. KEITHLEY" Date: Tue, 27 Nov 2018 14:24:15 -0500 Subject: glusterd: volume-ops calls naked malloc libglusterfs provides wrapper functions MALLOC/__gf_default_malloc, CALLOC/__gf_default_calloc, and REALLOC/__gf_default_realloc for those few places outside of mempool.c that need to call malloc/calloc/realloc directly. Notable exceptions are "contrib" code, e.g. rbtree and timer-wheel, and perhaps parsers generated by yacc+lex. But even parsers can be fixed to at least call the wrappers mentioned above, if not our own allocators Change-Id: Ie6156307b6d2183be9c9aff153afb7598974f4e4 updates: bz#1193929 Signed-off-by: Kaleb S. KEITHLEY --- xlators/mgmt/glusterd/src/glusterd-volume-ops.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xlators/mgmt/glusterd') diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c index e5d5a8380d2..d8f0c878677 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c +++ b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c @@ -113,7 +113,7 @@ glusterd_check_brick_order(dict_t *dict, char *err_str) GF_ASSERT(this); - ai_list = malloc(sizeof(addrinfo_list_t)); + ai_list = MALLOC(sizeof(addrinfo_list_t)); ai_list->info = NULL; CDS_INIT_LIST_HEAD(&ai_list->list); @@ -193,7 +193,7 @@ glusterd_check_brick_order(dict_t *dict, char *err_str) "host name"); goto out; } - ai_list_tmp1 = malloc(sizeof(addrinfo_list_t)); + ai_list_tmp1 = MALLOC(sizeof(addrinfo_list_t)); if (ai_list_tmp1 == NULL) { ret = 0; gf_msg(this->name, GF_LOG_ERROR, ENOMEM, GD_MSG_NO_MEMORY, -- cgit