From d2d7afefd861943f26b290d214fb5213d24b6a02 Mon Sep 17 00:00:00 2001 From: Vijay Bellur Date: Wed, 3 Jun 2015 23:43:55 +0530 Subject: features/marker: Cleanup loc in case of errors Missing loc_wipe() for error paths in mq_readdir_cbk() can cause memory leaks. loc_wipe() is now done for both happy and unhappy paths. Change-Id: I882aa5dcca06e25b56a828767fb2b91a1efaf83b BUG: 1227904 Signed-off-by: Vijay Bellur Reviewed-on: http://review.gluster.org/11074 Reviewed-by: Sachin Pandit Tested-by: NetBSD Build System Tested-by: Gluster Build System Reviewed-by: Vijaikumar Mallikarjuna Reviewed-by: Raghavendra G Tested-by: Raghavendra G --- xlators/features/marker/src/marker-quota.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'xlators/features/marker') diff --git a/xlators/features/marker/src/marker-quota.c b/xlators/features/marker/src/marker-quota.c index 97039440eb6..6d0830cde17 100644 --- a/xlators/features/marker/src/marker-quota.c +++ b/xlators/features/marker/src/marker-quota.c @@ -660,12 +660,10 @@ mq_readdir_cbk (call_frame_t *frame, &loc, dict); offset = entry->d_off; - - loc_wipe (&loc); - newframe = NULL; out: + loc_wipe (&loc); if (dict) { dict_unref (dict); dict = NULL; -- cgit