This is the mail archive of the
gdb-cvs@sourceware.org
mailing list for the GDB project.
[binutils-gdb/gdb-7.10-branch] Fix stale cleanup left by linux_mntns_access_fs
- From: Gary Benson <gary at sourceware dot org>
- To: gdb-cvs at sourceware dot org
- Date: 21 Aug 2015 16:00:33 -0000
- Subject: [binutils-gdb/gdb-7.10-branch] Fix stale cleanup left by linux_mntns_access_fs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=23778dcc5bb92541850e239d10bf19eb311a57b6
commit 23778dcc5bb92541850e239d10bf19eb311a57b6
Author: Gary Benson <gbenson@redhat.com>
Date: Fri Aug 21 16:55:53 2015 +0100
Fix stale cleanup left by linux_mntns_access_fs
This commit fixes a stale cleanup left by linux_mntns_access_fs.
gdb/ChangeLog:
* nat/linux-namespaces.c (linux_mntns_access_fs):
Do not overwrite old_chain.
Diff:
---
gdb/ChangeLog | 5 +++++
gdb/nat/linux-namespaces.c | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index d2a6cbc..fe07c5c 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2015-08-21 Gary Benson <gbenson@redhat.com>
+
+ * nat/linux-namespaces.c (linux_mntns_access_fs):
+ Do not overwrite old_chain.
+
2015-08-21 Pedro Alves <palves@redhat.com>
* remote.c (struct readahead_cache): New.
diff --git a/gdb/nat/linux-namespaces.c b/gdb/nat/linux-namespaces.c
index a7a3e4d..6fb0a2b 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;