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/server/src/nfs-common.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/server/src/nfs-common.c')
-rw-r--r-- | xlators/nfs/server/src/nfs-common.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/xlators/nfs/server/src/nfs-common.c b/xlators/nfs/server/src/nfs-common.c index 3623f041c..69bf46702 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; } |