From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12125 invoked by alias); 25 Jul 2011 20:58:39 -0000 Received: (qmail 12116 invoked by uid 22791); 25 Jul 2011 20:58:38 -0000 X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (74.125.121.67) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 25 Jul 2011 20:58:22 +0000 Received: from hpaq1.eem.corp.google.com (hpaq1.eem.corp.google.com [172.25.149.1]) by smtp-out.google.com with ESMTP id p6PKwLf1018744 for ; Mon, 25 Jul 2011 13:58:21 -0700 Received: from yic24 (yic24.prod.google.com [10.243.65.152]) by hpaq1.eem.corp.google.com with ESMTP id p6PKvFmn010690 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Mon, 25 Jul 2011 13:58:20 -0700 Received: by yic24 with SMTP id 24so3519189yic.21 for ; Mon, 25 Jul 2011 13:58:19 -0700 (PDT) MIME-Version: 1.0 Received: by 10.100.76.10 with SMTP id y10mr4518026ana.24.1311627499764; Mon, 25 Jul 2011 13:58:19 -0700 (PDT) Received: by 10.101.11.20 with HTTP; Mon, 25 Jul 2011 13:58:19 -0700 (PDT) In-Reply-To: References: Date: Mon, 25 Jul 2011 21:07:00 -0000 Message-ID: Subject: Re: [Patch] More responsive QUITs From: Sterling Augustine To: Tom Tromey Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-System-Of-Record: true 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 X-SW-Source: 2011-07/txt/msg00711.txt.bz2 On Mon, Jul 25, 2011 at 1:41 PM, Tom Tromey wrote: > Sterling> New revision of the patch which addresses this issue attached. > > You forgot to CC the list :) > > Sterling> + =A0struct cleanup *back_to; > > Sterling> =A0 =A0list[0] =3D NULL; > > Sterling> =A0 =A0if (!have_full_symbols () && !have_partial_symbols ()) > Sterling> =A0 =A0 =A0return list; > > Sterling> + =A0back_to =3D make_cleanup (xfree, list); > > This captures 'list' at this point in time, but list can be reallocated. > See add_filename_to_list. Will work on a fix for this. > Also, each element of list is itself mallocd and so must be freed. The calling function (completer.c:308 and below) doesn't free the individual elements either, so there is a more general gdb leak. I'll fix both. Sterling