From: Keith Seitz <keiths@redhat.com>
To: gdb-patches@sourceware.org
Subject: [RFA] Fix double free
Date: Sat, 18 Jul 2009 00:53:00 -0000 [thread overview]
Message-ID: <4A610157.10201@redhat.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 408 bytes --]
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 <keiths@redhat.com>
* source.c (forward_search_command): Don't fclose the stream,
just run the cleanups.
[-- Attachment #2: cleanup-buglet.patch --]
[-- Type: text/plain, Size: 614 bytes --]
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);
next reply other threads:[~2009-07-17 22:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-18 0:53 Keith Seitz [this message]
2009-07-18 6:12 ` Doug Evans
2009-07-18 18:00 ` Keith Seitz
2009-07-21 3:19 ` Doug Evans
2009-07-24 3:11 ` Keith Seitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A610157.10201@redhat.com \
--to=keiths@redhat.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox