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
This commit is contained in:
Pavan Sondur 2009-12-03 16:09:22 +00:00 committed by Anand V. Avati
parent 54046015d3
commit f4983bb29b

View File

@ -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;