diff options
author | Pavan Sondur <pavan@gluster.com> | 2009-12-03 16:09:22 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2009-12-03 13:54:49 -0800 |
commit | f4983bb29be027e40fcd379d0a018b87cf82fc85 (patch) | |
tree | 9a27d9394dbb7a3b3591b01c3390b1182467c064 | |
parent | 54046015d3c732b48304c9a5ecf7a7f8ff94c90e (diff) |
storage/posix: Fix Leak in posix_getxattr while filtering gen-number xattr.
Signed-off-by: Pavan Vilas Sondur <pavan@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 315 (generation number support)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=315
-rw-r--r-- | xlators/storage/posix/src/posix.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c index a48d2f42d3e..dfa1e28d576 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; |