From f4983bb29be027e40fcd379d0a018b87cf82fc85 Mon Sep 17 00:00:00 2001 From: Pavan Sondur Date: Thu, 3 Dec 2009 16:09:22 +0000 Subject: storage/posix: Fix Leak in posix_getxattr while filtering gen-number xattr. Signed-off-by: Pavan Vilas Sondur Signed-off-by: Anand V. Avati BUG: 315 (generation number support) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=315 --- xlators/storage/posix/src/posix.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c index a48d2f42d3..dfa1e28d57 100644 --- a/xlators/storage/posix/src/posix.c +++ b/xlators/storage/posix/src/posix.c @@ -3219,6 +3219,8 @@ posix_getxattr (call_frame_t *frame, xlator_t *this, value [op_ret] = '\0'; if (strcmp (key, gen_key) != 0) dict_set (dict, key, data_from_dynptr (value, op_ret)); + else + FREE (value); remaining_size -= strlen (key) + 1; list_offset += strlen (key) + 1; -- cgit