diff options
author | Vijay Bellur <vijay@gluster.com> | 2010-04-22 13:33:09 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-04-23 06:32:52 -0700 |
commit | 582de0677da4be19fc6f873625c58c45d069ab1c (patch) | |
tree | f10cb3e26e1f92f6ea91034e6f7bb925790dd9bc /xlators/nfs/lib/src/rpcsvc-auth.c | |
parent | 72baa17282f5cf749fa743fd601c7b728ece4fa2 (diff) |
Memory accounting changes
Memory accounting Changes. Thanks to Vinayak Hegde and Csaba Henk for their
contributions.
Signed-off-by: Vijay Bellur <vijay@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 329 (Replacing memory allocation functions with mem-type functions)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=329
Diffstat (limited to 'xlators/nfs/lib/src/rpcsvc-auth.c')
-rw-r--r-- | xlators/nfs/lib/src/rpcsvc-auth.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/xlators/nfs/lib/src/rpcsvc-auth.c b/xlators/nfs/lib/src/rpcsvc-auth.c index 38697965b..f61fe91d0 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; |