Fix stale cleanup left by linux_mntns_access_fs
authorGary Benson <gbenson@redhat.com>
Fri, 21 Aug 2015 15:55:53 +0000 (16:55 +0100)
committerGary Benson <gbenson@redhat.com>
Fri, 21 Aug 2015 15:57:32 +0000 (16:57 +0100)
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.

gdb/ChangeLog
gdb/nat/linux-namespaces.c

index d2a6cbc..fe07c5c 100644 (file)
@@ -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.
index a7a3e4d..6fb0a2b 100644 (file)
@@ -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;