efl/eina_xattr: Fix memory leak in eina_xattr_value_ls.
authorStefan Schmidt <stefan@datenfreihafen.org>
Fri, 8 Feb 2013 15:49:59 +0000 (15:49 +0000)
committerStefan Schmidt <stefan@datenfreihafen.org>
Fri, 8 Feb 2013 15:49:59 +0000 (15:49 +0000)
In the error case we freed the iterator but not the attribute.

SVN revision: 83791

src/lib/eina/eina_xattr.c

index a8521da..d5e6970 100644 (file)
@@ -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);