From patchwork Fri Aug 21 16:02:29 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gary Benson X-Patchwork-Id: 8340 Received: (qmail 113443 invoked by alias); 21 Aug 2015 16:02:34 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 113433 invoked by uid 89); 21 Aug 2015 16:02:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 21 Aug 2015 16:02:33 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 32FCC5BA0F for ; Fri, 21 Aug 2015 16:02:32 +0000 (UTC) Received: from blade.nx (ovpn-116-91.ams2.redhat.com [10.36.116.91]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t7LG2Vx4003838 for ; Fri, 21 Aug 2015 12:02:31 -0400 Received: from blade.nx (localhost [127.0.0.1]) by blade.nx (Postfix) with ESMTP id B0F8B262FB1 for ; Fri, 21 Aug 2015 17:02:29 +0100 (BST) From: Gary Benson To: gdb-patches@sourceware.org Subject: [OB PATCH] Fix stale cleanup left by linux_mntns_access_fs Date: Fri, 21 Aug 2015 17:02:29 +0100 Message-Id: <1440172949-1723-1-git-send-email-gbenson@redhat.com> X-IsSubscribed: yes 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;