[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd] 11/17: Fixed leaks in _netfs_translator_callback2_fn
From: |
Samuel Thibault |
Subject: |
[hurd] 11/17: Fixed leaks in _netfs_translator_callback2_fn |
Date: |
Mon, 15 Feb 2016 09:10:03 +0000 |
This is an automated email from the git hooks/post-receive script.
sthibault pushed a commit to branch upstream
in repository hurd.
commit 23f66dec527cea00bd5613c6d52d22a50b54f3d0
Author: James Clarke <address@hidden>
Date: Sun Feb 7 23:18:11 2016 +0000
Fixed leaks in _netfs_translator_callback2_fn
* libnetfs/trans-callback.c (_netfs_translator_callback2_fn): Fixed leaking
iouser and peropen structs on error.
---
libnetfs/trans-callback.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/libnetfs/trans-callback.c b/libnetfs/trans-callback.c
index 3f1aee6..ed21aa2 100644
--- a/libnetfs/trans-callback.c
+++ b/libnetfs/trans-callback.c
@@ -67,7 +67,11 @@ _netfs_translator_callback2_fn (void *cookie1, void
*cookie2, int flags,
po = netfs_make_peropen (node, flags, cookie2);
if (! po)
- return errno;
+ {
+ err = errno;
+ iohelp_free_iouser (user);
+ return err;
+ }
cred = netfs_make_protid (po, user);
if (cred)
@@ -79,8 +83,10 @@ _netfs_translator_callback2_fn (void *cookie1, void
*cookie2, int flags,
}
else
{
+ err = errno;
+ netfs_release_peropen (po);
iohelp_free_iouser (user);
- return errno;
+ return err;
}
}
--
Alioth's /usr/local/bin/git-commit-notice on
/srv/git.debian.org/git/pkg-hurd/hurd.git
- [hurd] branch upstream updated (0aa179e -> ffaff64), Samuel Thibault, 2016/02/15
- [hurd] 03/17: procfs: Move setting default parameters to a separate function, Samuel Thibault, 2016/02/15
- [hurd] 11/17: Fixed leaks in _netfs_translator_callback2_fn,
Samuel Thibault <=
- [hurd] 04/17: exec: remove duplicate function call, Samuel Thibault, 2016/02/15
- [hurd] 02/17: Fix typo, Samuel Thibault, 2016/02/15
- [hurd] 16/17: Fix function name, Samuel Thibault, 2016/02/15
- [hurd] 14/17: Make sure to complete auth_server_authenticate, Samuel Thibault, 2016/02/15
- [hurd] 15/17: Fix hang on reauthentication, Samuel Thibault, 2016/02/15
- [hurd] 05/17: utils/settrans: improve --chroot functionality, Samuel Thibault, 2016/02/15
- [hurd] 08/17: mach-defpager: link dynamically, Samuel Thibault, 2016/02/15
- [hurd] 09/17: devnode: fix falling back to the kernel driver, Samuel Thibault, 2016/02/15
- [hurd] 01/17: Also build exec.static, Samuel Thibault, 2016/02/15
- [hurd] 12/17: utils/vmallocate: new utility, Samuel Thibault, 2016/02/15