From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10712 invoked by alias); 18 Jun 2013 19:44:37 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 10627 invoked by uid 89); 18 Jun 2013 19:44:36 -0000 X-Spam-SWARE-Status: No, score=-7.5 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 18 Jun 2013 19:44:36 +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 (8.14.4/8.14.4) with ESMTP id r5IJiZis013855 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Tue, 18 Jun 2013 15:44:35 -0400 Received: from barimba.redhat.com (ovpn-113-102.phx2.redhat.com [10.3.113.102]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r5IJiWlm021231; Tue, 18 Jun 2013 15:44:34 -0400 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 3/3] fix solib-som.c Date: Tue, 18 Jun 2013 19:44:00 -0000 Message-Id: <1371584669-1687-4-git-send-email-tromey@redhat.com> In-Reply-To: <1371584669-1687-1-git-send-email-tromey@redhat.com> References: <1371584669-1687-1-git-send-email-tromey@redhat.com> X-SW-Source: 2013-06/txt/msg00460.txt.bz2 som_open_symbol_file_object was leaking a cleanup. * solib-som.c (som_open_symbol_file_object): Call do_cleanups. --- gdb/solib-som.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gdb/solib-som.c b/gdb/solib-som.c index f88b539..457e464 100644 --- a/gdb/solib-som.c +++ b/gdb/solib-som.c @@ -698,6 +698,7 @@ som_open_symbol_file_object (void *from_ttyp) int errcode; int from_tty = *(int *)from_ttyp; gdb_byte buf[4]; + struct cleanup *cleanup; if (symfile_objfile) if (!query (_("Attempt to reload symbols from process? "))) @@ -727,10 +728,11 @@ som_open_symbol_file_object (void *from_ttyp) return 0; } - make_cleanup (xfree, filename); + cleanup = make_cleanup (xfree, filename); /* Have a pathname: read the symbol file. */ symbol_file_add_main (filename, from_tty); + do_cleanups (cleanup); return 1; } -- 1.8.1.4