This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Fix dangling cleanup in linespec_parse_basic
- From: Tom Tromey <tromey at redhat dot com>
- To: Keith Seitz <keiths at redhat dot com>
- Cc: "gdb-patches\ at sourceware dot org ml" <gdb-patches at sourceware dot org>
- Date: Fri, 25 Apr 2014 13:05:34 -0600
- Subject: Re: [RFA] Fix dangling cleanup in linespec_parse_basic
- Authentication-results: sourceware.org; auth=none
- References: <535A9F8F dot 1080809 at redhat dot com>
>>>>> "Keith" == Keith Seitz <keiths@redhat.com> writes:
Keith> For a linespec such as "filename:$convenience_variable", the local
Keith> variable holding the name of the convenience variable ('name' in the
Keith> code) is not freed if no parsing error occurred, i.e., the convenience
Keith> variable is defined. This leaves a dangling cleanup.
Keith> The error case was already properly handling the cleanup. This patch
Keith> adds the appropriate cleanup handling when there is no error.
Keith> I've also added a test for this to ls-dollar.exp.
Thanks.
This patch is ok.
I found the cleanup code in linespec_parse_basic a bit hard to follow
but I don't have any concrete suggestions.
Tom