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:56:22 +0000 (16:56 +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 0393652..0cb0c7b 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-20  Max Filippov  <jcmvbkbc@gmail.com>
 
        * arch/xtensa.h: New file.
index fd0d4b0..4341429 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;