From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28042 invoked by alias); 17 Jul 2009 22:55:34 -0000 Received: (qmail 28033 invoked by uid 22791); 17 Jul 2009 22:55:34 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mx2.redhat.com (HELO mx2.redhat.com) (66.187.237.31) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 17 Jul 2009 22:55:25 +0000 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n6HMtNsi008514 for ; Fri, 17 Jul 2009 18:55:23 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n6HMtMoI019077 for ; Fri, 17 Jul 2009 18:55:22 -0400 Received: from [IPv6:::1] (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n6HMtKL8021805 for ; Fri, 17 Jul 2009 18:55:21 -0400 Message-ID: <4A610157.10201@redhat.com> Date: Sat, 18 Jul 2009 00:53:00 -0000 From: Keith Seitz User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1b3pre) Gecko/20090513 Fedora/3.0-2.3.beta2.fc11 Lightning/1.0pre Thunderbird/3.0b2 MIME-Version: 1.0 To: gdb-patches@sourceware.org Subject: [RFA] Fix double free Content-Type: multipart/mixed; boundary="------------050807010904010008070604" X-IsSubscribed: yes 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: 2009-07/txt/msg00440.txt.bz2 This is a multi-part message in MIME format. --------------050807010904010008070604 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-length: 408 Hi, An insight user (yes, there are still a few of us ;-) noticed that insight would crash when using gdb's "search" command. Turns out this is a simple cleanup buglet. I think it is easier to read the patch than explain, so I'll leave it at that. Ok? Keith ChangeLog 2009-07-17 Keith Seitz * source.c (forward_search_command): Don't fclose the stream, just run the cleanups. --------------050807010904010008070604 Content-Type: text/plain; name="cleanup-buglet.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="cleanup-buglet.patch" Content-length: 614 Index: source.c =================================================================== RCS file: /cvs/src/src/gdb/source.c,v retrieving revision 1.102 diff -u -p -r1.102 source.c --- source.c 6 Jul 2009 18:23:47 -0000 1.102 +++ source.c 17 Jul 2009 20:08:38 -0000 @@ -1612,7 +1612,7 @@ forward_search_command (char *regex, int if (re_exec (buf) > 0) { /* Match! */ - fclose (stream); + do_cleanups (cleanups); print_source_lines (current_source_symtab, line, line + 1, 0); set_internalvar_integer (lookup_internalvar ("_"), line); current_source_line = max (line - lines_to_list / 2, 1); --------------050807010904010008070604--