From 6467f603955bdea591d2f9a5d0c8e058dbbc94a7 Mon Sep 17 00:00:00 2001 From: Stefan Schmidt Date: Fri, 8 Feb 2013 15:49:59 +0000 Subject: [PATCH] efl/eina_xattr: Fix memory leak in eina_xattr_value_ls. In the error case we freed the iterator but not the attribute. SVN revision: 83791 --- src/lib/eina/eina_xattr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/eina/eina_xattr.c b/src/lib/eina/eina_xattr.c index a8521da58f..d5e6970840 100644 --- a/src/lib/eina/eina_xattr.c +++ b/src/lib/eina/eina_xattr.c @@ -323,8 +323,9 @@ eina_xattr_value_ls(const char *file) it->length = listxattr(file, it->xattr, length); if (it->length != length) { + free(it->attr); free(it); - return NULL; + return NULL; } it->file = eina_stringshare_add(file);