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/server/src/nfs-common.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'xlators/nfs/server/src/nfs-common.c') diff --git a/xlators/nfs/server/src/nfs-common.c b/xlators/nfs/server/src/nfs-common.c index 3623f041..69bf4670 100644 --- a/xlators/nfs/server/src/nfs-common.c +++ b/xlators/nfs/server/src/nfs-common.c @@ -30,6 +30,7 @@ #include "iobuf.h" #include "nfs-common.h" #include "nfs-fops.h" +#include "nfs-mem-types.h" #include "rpcsvc.h" #include "iatt.h" @@ -144,7 +145,7 @@ nfs_loc_wipe (loc_t *loc) return; if (loc->path) { - FREE (loc->path); + GF_FREE ((char *)loc->path); loc->path = NULL; } @@ -175,7 +176,7 @@ nfs_loc_copy (loc_t *dst, loc_t *src) if (src->parent) dst->parent = inode_ref (src->parent); - dst->path = strdup (src->path); + dst->path = gf_strdup (src->path); if (!dst->path) goto out; @@ -206,7 +207,7 @@ nfs_loc_fill (loc_t *loc, inode_t *inode, inode_t *parent, char *path) if (parent) loc->parent = inode_ref (parent); - loc->path = strdup (path); + loc->path = gf_strdup (path); if (!loc->path) { gf_log (GF_NFS, GF_LOG_ERROR, "strdup failed"); goto loc_wipe; @@ -258,7 +259,7 @@ err: inode_unref (parent); if (resolvedpath) - FREE (resolvedpath); + GF_FREE (resolvedpath); return ret; } @@ -370,7 +371,7 @@ err: inode_unref (entryinode); if (resolvedpath) - FREE (resolvedpath); + GF_FREE (resolvedpath); return ret; } -- cgit