summaryrefslogtreecommitdiffstats
path: root/xlators/performance/io-cache
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@gluster.com>2010-09-14 04:31:02 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-09-14 03:49:01 -0700
commitff9eb1d536f2c57ec216b9ce8b96d1f536984008 (patch)
tree1efd0b8ea4134e96a189e2a02dfd45fa8e80b2d7 /xlators/performance/io-cache
parentdf331224c570d85f597d51b6072c44c1ff5f46f5 (diff)
performance/io-cache: fix memory leak in ioc_mknod.
Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1438 (memory leaks) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1438
Diffstat (limited to 'xlators/performance/io-cache')
-rw-r--r--xlators/performance/io-cache/src/io-cache.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/xlators/performance/io-cache/src/io-cache.c b/xlators/performance/io-cache/src/io-cache.c
index 0809b6a82..490d31688 100644
--- a/xlators/performance/io-cache/src/io-cache.c
+++ b/xlators/performance/io-cache/src/io-cache.c
@@ -690,6 +690,8 @@ ioc_mknod_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
}
frame->local = NULL;
+
+ loc_wipe (&local->file_loc);
GF_FREE (local);
STACK_UNWIND_STRICT (mknod, frame, op_ret, op_errno, inode, buf,
@@ -729,6 +731,11 @@ ioc_mknod (call_frame_t *frame, xlator_t *this, loc_t *loc, mode_t mode,
return 0;
unwind:
+ if (local != NULL) {
+ loc_wipe (&local->file_loc);
+ GF_FREE (local);
+ }
+
STACK_UNWIND_STRICT (mknod, frame, -1, op_errno, NULL, NULL,
NULL, NULL);