diff options
author | Kaleb S. KEITHLEY <kkeithle@redhat.com> | 2018-11-27 11:19:59 -0500 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2018-11-28 18:15:42 +0000 |
commit | f0232d07f7e6543b56830be28f6e80f9085e6241 (patch) | |
tree | b1e2d948531a45635381a04d52aa6bdbfb2eb69b | |
parent | 18b6d7ce7d490e807815270918a17a4b392a829d (diff) |
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 <kkeithle@redhat.com>
-rw-r--r-- | libglusterfs/src/ctx.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libglusterfs/src/ctx.c b/libglusterfs/src/ctx.c index 170a5752452..7a0e0ad5ea4 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; } |