summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaleb S. KEITHLEY <kkeithle@redhat.com>2018-11-27 14:24:15 -0500
committerAtin Mukherjee <amukherj@redhat.com>2018-11-28 04:22:43 +0000
commit9f9f46ff2d30ff87a6a4f8c2af491ea1aa92fbb2 (patch)
tree7ca6d4b7827049117ea2da74d43acc4c81d8feb6
parent3566903e03f90e262483a5d53a6c85f0b16ece3a (diff)
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 <kkeithle@redhat.com>
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volume-ops.c4
1 files changed, 2 insertions, 2 deletions
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,