From 582de0677da4be19fc6f873625c58c45d069ab1c Mon Sep 17 00:00:00 2001 From: Vijay Bellur Date: Thu, 22 Apr 2010 13:33:09 +0000 Subject: Memory accounting changes Memory accounting Changes. Thanks to Vinayak Hegde and Csaba Henk for their contributions. Signed-off-by: Vijay Bellur Signed-off-by: Anand V. Avati BUG: 329 (Replacing memory allocation functions with mem-type functions) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=329 --- xlators/nfs/lib/src/rpcsvc-auth.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'xlators/nfs/lib/src/rpcsvc-auth.c') diff --git a/xlators/nfs/lib/src/rpcsvc-auth.c b/xlators/nfs/lib/src/rpcsvc-auth.c index 38697965bbd..f61fe91d0b2 100644 --- a/xlators/nfs/lib/src/rpcsvc-auth.c +++ b/xlators/nfs/lib/src/rpcsvc-auth.c @@ -36,7 +36,7 @@ rpcsvc_auth_add_initer (struct list_head *list, char *idfier, if ((!list) || (!init) || (!idfier)) return -1; - new = CALLOC (1, sizeof (*new)); + new = GF_CALLOC (1, sizeof (*new), gf_common_mt_rpcsvc_auth_list); if (!new) { gf_log (GF_RPCSVC, GF_LOG_ERROR, "Memory allocation failed"); return -1; @@ -312,7 +312,7 @@ rpcsvc_auth_array (rpcsvc_t *svc, char *volname, int *autharr, int arrlen) if (count >= arrlen) break; - gen = asprintf (&srchstr, "rpc-auth.%s", auth->name); + gen = gf_asprintf (&srchstr, "rpc-auth.%s", auth->name); if (gen == -1) { count = -1; goto err; @@ -334,9 +334,9 @@ rpcsvc_auth_array (rpcsvc_t *svc, char *volname, int *autharr, int arrlen) "d to read auth val"); } - FREE (srchstr); - spec = asprintf (&srchstr, "rpc-auth.%s.%s", auth->name, - volname); + GF_FREE (srchstr); + spec = gf_asprintf (&srchstr, "rpc-auth.%s.%s", auth->name, + volname); if (spec == -1) { count = -1; goto err; @@ -360,7 +360,7 @@ rpcsvc_auth_array (rpcsvc_t *svc, char *volname, int *autharr, int arrlen) "d to read auth val"); } - FREE (srchstr); + GF_FREE (srchstr); final = rpcsvc_combine_gen_spec_volume_checks (gen, spec); if (final == RPCSVC_AUTH_ACCEPT) { autharr[count] = auth->auth->authnum; -- cgit