From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2126) id E093A38582B4; Wed, 31 Aug 2022 17:14:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E093A38582B4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1661966054; bh=6wtWT7vt5bLKPuLBdxVHn9trShHAA7FlpLo3P/osgb4=; h=From:To:Subject:Date:From; b=SbdakhsMDe1jw01nV0k0crN+WWHCnT9/LiKJNj0Mi2bEe1804nkRoyHsczlHhbCwc 52jaBHoFbK/m6km9xrikYgGIfHBSxt+2ScTDlxwAAiRrrKUuwn3oyp5N9uUaWNLyWL 14FXpEYKJyQNEw5wlxBJsIzEaUI/YHn3CuxN8FAM= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tom Tromey To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Free ui::line_buffer X-Act-Checkin: binutils-gdb X-Git-Author: Tom Tromey X-Git-Refname: refs/heads/master X-Git-Oldrev: 10d6fc874c0201bd28c57525fc9465f2bcd680ec X-Git-Newrev: 55a6603404099c0b61a5e4613712d3935c2e2bb6 Message-Id: <20220831171414.E093A38582B4@sourceware.org> Date: Wed, 31 Aug 2022 17:14:14 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D55a660340409= 9c0b61a5e4613712d3935c2e2bb6 commit 55a6603404099c0b61a5e4613712d3935c2e2bb6 Author: Tom Tromey Date: Thu Aug 11 09:23:47 2022 -0600 Free ui::line_buffer =20 A ui initializes its line_buffer, but never calls buffer_free on it. This patch fixes the oversight. I found this by inspection. Diff: --- gdb/top.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gdb/top.c b/gdb/top.c index 07e491440e4..18a447e701b 100644 --- a/gdb/top.c +++ b/gdb/top.c @@ -352,6 +352,8 @@ ui::~ui () delete m_gdb_stdin; delete m_gdb_stdout; delete m_gdb_stderr; + + buffer_free (&line_buffer); } =20 /* Open file named NAME for read/write, making sure not to make it the