summaryrefslogtreecommitdiffstats
path: root/xlators/features/marker
diff options
context:
space:
mode:
authorManikandan Selvaganesh <mselvaga@redhat.com>2015-11-23 15:58:42 +0530
committerVijay Bellur <vbellur@redhat.com>2015-11-23 11:03:25 -0800
commitf2287d00c7dc9c088860c12191ff760586889dde (patch)
treef35baaabf091c9b9c8ff69e237b4436df0b6ab37 /xlators/features/marker
parent41e900199d7f369862b21b739dd11602d0d7c48d (diff)
marker : fixing memory leak issue in marker
In marker_readdirp_cbk, variable resolvedpath is not properly freed and because of which there was a memory leak. The patch fixes it. Change-Id: I9d80f72e3551aa912369257da3e8e2b261a2067f BUG: 1284419 Signed-off-by: Manikandan Selvaganesh <mselvaga@redhat.com> Reviewed-on: http://review.gluster.org/12719 Reviewed-by: Vijaikumar Mallikarjuna <vmallika@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/features/marker')
-rw-r--r--xlators/features/marker/src/marker.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/xlators/features/marker/src/marker.c b/xlators/features/marker/src/marker.c
index e388bf85d2b..b91cc8f435a 100644
--- a/xlators/features/marker/src/marker.c
+++ b/xlators/features/marker/src/marker.c
@@ -2963,19 +2963,11 @@ marker_readdirp_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
continue;
}
- loc.path = gf_strdup (resolvedpath);
- if (!loc.path) {
- gf_log (this->name, GF_LOG_ERROR, "strdup of path "
- "failed for the entry %s (path: %s)",
- entry->d_name, resolvedpath);
- loc_wipe (&loc);
- continue;
- }
+ loc.path = resolvedpath;
+ resolvedpath = NULL;
mq_xattr_state (this, &loc, entry->dict, entry->d_stat);
loc_wipe (&loc);
- GF_FREE (resolvedpath);
- resolvedpath = NULL;
ret = marker_key_set_ver (this, entry->dict);
if (ret < 0) {