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>
This commit is contained in:
parent
18b6d7ce7d
commit
f0232d07f7
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user