]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Avoid potential memory leak in find_frame_funname
authorTom Tromey <tom@tromey.com>
Wed, 3 Aug 2016 14:27:56 +0000 (08:27 -0600)
committerTom Tromey <tom@tromey.com>
Wed, 3 Aug 2016 15:56:55 +0000 (09:56 -0600)
commitd2ed2edaf76fc10505214290d04c3cf312acfbca
tree7ff1c9e2916207ba40630d6a4cc0f658159e7820
parent10bb85f1e551930724e87e636659b36500f44a0c
Avoid potential memory leak in find_frame_funname

The PR 18565 thread pointed out that, if cp_remove_params can throw
(we aren't quite sure), then find_frame_funname could leak some
memory.  This patch avoids any potential issue by rearranging some
code in find_frame_funname.

Built and regtested on x86-64 Fedora 24.

2016-08-03  Tom Tromey  <tom@tromey.com>

* stack.c (find_frame_funname): Avoid any possible leak in case
cp_remove_params can throw.
gdb/ChangeLog
gdb/stack.c