Mercurial > gnulib
changeset 10171:f988df7e273d
Fix memory leak introduced on 2008-05-22.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Sun, 08 Jun 2008 04:51:21 +0200 |
parents | 75a6b6b966a8 |
children | 50e666f281ef |
files | ChangeLog lib/set-mode-acl.c |
diffstat | 2 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Sun Jun 08 04:39:51 2008 +0200 +++ b/ChangeLog Sun Jun 08 04:51:21 2008 +0200 @@ -1,3 +1,9 @@ +2008-06-07 Bruno Haible <bruno@clisp.org> + + Fix memory leak introduced on 2008-05-22. + * lib/set-mode-acl.c (qset_acl) [!MODE_INSIDE_ACL]: Free ACLs after + use. + 2008-06-07 Bruno Haible <bruno@clisp.org> * lib/set-mode-acl.c (qset_acl): Use acl_init(), not acl_from_text(),
--- a/lib/set-mode-acl.c Sun Jun 08 04:39:51 2008 +0200 +++ b/lib/set-mode-acl.c Sun Jun 08 04:51:21 2008 +0200 @@ -153,6 +153,8 @@ acl = acl_get_file (name, ACL_TYPE_ACCESS); if (acl) { + acl_free (acl); + acl = acl_init (0); if (acl) { @@ -176,6 +178,7 @@ errno = saved_errno; return -1; } + acl_free (acl); } }