From 7ed1acafa0b5d135342f9dcc0eb0387dff95005a Mon Sep 17 00:00:00 2001 From: Tim Wiederhake Date: Fri, 5 May 2017 08:20:50 +0200 Subject: [PATCH] btrace: Fix memory leak in btrace_clear. --- gdb/ChangeLog | 4 ++++ gdb/btrace.c | 1 + 2 files changed, 5 insertions(+) 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); } -- 2.30.2