This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[OB PATCH] Fix stale cleanup left by linux_mntns_access_fs
- From: Gary Benson <gbenson at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Fri, 21 Aug 2015 17:02:29 +0100
- Subject: [OB PATCH] Fix stale cleanup left by linux_mntns_access_fs
- Authentication-results: sourceware.org; auth=none
Hi all,
This commit fixes a stale cleanup left by linux_mntns_access_fs.
Pushed as obvious to master and to 7.10.
Thanks Pedro for pointing this out.
Cheers,
Gary
---
gdb/ChangeLog:
* nat/linux-namespaces.c (linux_mntns_access_fs):
Do not overwrite old_chain.
---
gdb/ChangeLog | 5 +++++
gdb/nat/linux-namespaces.c | 2 +-
2 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/gdb/nat/linux-namespaces.c b/gdb/nat/linux-namespaces.c
index fd0d4b0..4341429 100644
--- a/gdb/nat/linux-namespaces.c
+++ b/gdb/nat/linux-namespaces.c
@@ -894,7 +894,7 @@ linux_mntns_access_fs (pid_t pid)
if (fd < 0)
goto error;
- old_chain = make_cleanup_close (fd);
+ make_cleanup_close (fd);
if (fstat (fd, &sb) != 0)
goto error;
--
1.7.1