summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Schmidt <s.schmidt@samsung.com>2013-06-11 11:12:27 +0100
committerStefan Schmidt <s.schmidt@samsung.com>2013-06-11 11:23:12 +0100
commit2a12fc81e1f6663d7df8c920de76a27dec8ce119 (patch)
tree38be570b64bdd489bcc2ccbfad90d9d79d564007
parentffcca777ed6b3ca228c1cd0d222af63cec546e65 (diff)
eina_xattr: Backport memory leak fix.
Backport of 6467f603955bdea591d2f9a5d0c8e058dbbc94a7 / svn rev 83791 In the error case we freed the iterator but not the attribute.
-rw-r--r--ChangeLog4
-rw-r--r--NEWS7
-rw-r--r--src/lib/eina_xattr.c1
3 files changed, 11 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 244e96c..9ce3976 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -418,3 +418,7 @@
4182013-04-04 Rafael Antognolli 4182013-04-04 Rafael Antognolli
419 419
420 * 1.7.6 release 420 * 1.7.6 release
421
4222013-06-11 Stefan Schmidt
423
424 * Fix memory leak in eina_xattr_value_ls
diff --git a/NEWS b/NEWS
index 7ae84ca..3a30891 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,9 @@
1Eina 1.7.7 1Changes since Eina 1.7.7:
2-------------------------
3
4Fixes:
5 * Fix memory leak in eina_xattr_value_ls
6
2 7
3Changes since Eina 1.7.6: 8Changes since Eina 1.7.6:
4------------------------- 9-------------------------
diff --git a/src/lib/eina_xattr.c b/src/lib/eina_xattr.c
index d4ed139..5315cac 100644
--- a/src/lib/eina_xattr.c
+++ b/src/lib/eina_xattr.c
@@ -306,6 +306,7 @@ eina_xattr_value_ls(const char *file)
306 it->length = listxattr(file, it->xattr, length); 306 it->length = listxattr(file, it->xattr, length);
307 if (it->length != length) 307 if (it->length != length)
308 { 308 {
309 free(it->attr);
309 free(it); 310 free(it);
310 return NULL; 311 return NULL;
311 } 312 }