[haiku-commits] haiku: hrev53507 - src/apps/terminal

  • From: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 21 Sep 2019 12:09:36 -0400 (EDT)

hrev53507 adds 1 changeset to branch 'master'
old head: 36bf86d2b6114bd2a21ca4edaf7b996921c5da44
new head: 7ddb9624b23605ee64a176e73d222a2b74f424fa
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=7ddb9624b236+%5E36bf86d2b611

----------------------------------------------------------------------------

7ddb9624b236: Terminal: Fix mismatching malloc/delete
  
  fAlternateScreen is allocated by malloc() in
  BasicTerminalBuffer::_AllocateLines(), but freed by delete.
  Pointed out by LGTM.
  
  Change-Id: I526ecd7e570caf7d5ed90c715bbbfaf40e7e4be6
  Reviewed-on: https://review.haiku-os.org/c/haiku/+/1882
  Reviewed-by: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>

                                      [ Murai Takashi <tmurai01@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev53507
Commit:      7ddb9624b23605ee64a176e73d222a2b74f424fa
URL:         https://git.haiku-os.org/haiku/commit/?id=7ddb9624b236
Author:      Murai Takashi <tmurai01@xxxxxxxxx>
Date:        Sat Sep 21 07:04:11 2019 UTC
Committer:   Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
Commit-Date: Sat Sep 21 16:09:27 2019 UTC

----------------------------------------------------------------------------

1 file changed, 1 insertion(+), 1 deletion(-)
src/apps/terminal/TerminalBuffer.cpp | 2 +-

----------------------------------------------------------------------------

diff --git a/src/apps/terminal/TerminalBuffer.cpp 
b/src/apps/terminal/TerminalBuffer.cpp
index 2637285f00..e3fd5fb731 100644
--- a/src/apps/terminal/TerminalBuffer.cpp
+++ b/src/apps/terminal/TerminalBuffer.cpp
@@ -39,7 +39,7 @@ TerminalBuffer::TerminalBuffer()
 
 TerminalBuffer::~TerminalBuffer()
 {
-       delete fAlternateScreen;
+       free(fAlternateScreen);
        delete fAlternateHistory;
        delete[] fColorsPalette;
 }


Other related posts:

  • » [haiku-commits] haiku: hrev53507 - src/apps/terminal - Axel Dörfler