summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorN Balachandran <nbalacha@redhat.com>2016-09-28 21:38:57 +0530
committerPranith Kumar Karampuri <pkarampu@redhat.com>2016-10-24 23:08:45 -0700
commitbca6d0ba54d12d389cfb5c2b37fb8cc12a7e044b (patch)
treeb8a16f1d43ca8ea60fef5b0d4e765b5ace6695aa
parent1506c7a98d8d3b31e68d0f214ab331f28ffa9fb5 (diff)
protocol/client: reduce memory usage
readdirp calls use a lot of memory in case of a large number of files. The dict->extra_free is not used here so free buf immediately. Change-Id: I097f5dde2df471f5834264152711110a3bdb7e9a BUG: 1380249 Signed-off-by: N Balachandran <nbalacha@redhat.com> Reviewed-on: http://review.gluster.org/15593 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
-rw-r--r--xlators/protocol/client/src/client-helpers.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/protocol/client/src/client-helpers.c b/xlators/protocol/client/src/client-helpers.c
index 8293d47c102..7e9bbf60aa7 100644
--- a/xlators/protocol/client/src/client-helpers.c
+++ b/xlators/protocol/client/src/client-helpers.c
@@ -235,7 +235,7 @@ unserialize_rsp_direntp (xlator_t *this, fd_t *fd,
"failed to unserialize xattr dict");
goto out;
}
- entry->dict->extra_free = buf;
+ GF_FREE (buf);
buf = NULL;
}