From f0232d07f7e6543b56830be28f6e80f9085e6241 Mon Sep 17 00:00:00 2001 From: "Kaleb S. KEITHLEY" Date: Tue, 27 Nov 2018 11:19:59 -0500 Subject: core: ctx calls naked calloc() liblglusterfs 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: Ib8069815eba9b6c04c3adaf59727ec8d8795c4d1 updates: bz#1193929 Signed-off-by: Kaleb S. KEITHLEY --- libglusterfs/src/ctx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libglusterfs/src/ctx.c b/libglusterfs/src/ctx.c index 170a575245..7a0e0ad5ea 100644 --- a/libglusterfs/src/ctx.c +++ b/libglusterfs/src/ctx.c @@ -21,7 +21,7 @@ glusterfs_ctx_new() /* no GF_CALLOC here, gf_acct_mem_set_enable is not yet decided at this point */ - ctx = calloc(1, sizeof(*ctx)); + ctx = CALLOC(1, sizeof(*ctx)); if (!ctx) { goto out; } -- cgit