From: Tim Wiederhake Date: Fri, 5 May 2017 06:20:50 +0000 (+0200) Subject: btrace: Fix memory leak in btrace_clear. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7ed1acafa0b5d135342f9dcc0eb0387dff95005a;p=binutils-gdb.git btrace: Fix memory leak in btrace_clear. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 475091d7805..5faefca1d88 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2017-05-05 Tim Wiederhake + + * btrace.c (btrace_clear): Free insn vector. + 2017-05-05 Pedro Alves * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized. diff --git a/gdb/btrace.c b/gdb/btrace.c index 380108682ef..20c977a2815 100644 --- a/gdb/btrace.c +++ b/gdb/btrace.c @@ -1893,6 +1893,7 @@ btrace_clear (struct thread_info *tp) trash = it; it = it->flow.next; + VEC_free (btrace_insn_s, trash->insn); xfree (trash); }