[haiku-commits] haiku: hrev53504 - src/apps/deskcalc

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

hrev53504 adds 1 changeset to branch 'master'
old head: 7abf1b6fba46db78b32cc4a9267a8b7ee019edaa
new head: dfb3c928f87edb68cfb3dda940e15fd8d24a003f
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=dfb3c928f87e+%5E7abf1b6fba46

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

dfb3c928f87e: Deskcalc: Fix 'new[]' array freed with 'delete'
  
  fKeypad is allocated by new[] in _ParseCalcDesc(), but freed by delete.
  Pointed out by LGTM.
  
  Change-Id: Iac81d3cc6bfcf003ddf9146415a4400c34a1b7f2
  Reviewed-on: https://review.haiku-os.org/c/haiku/+/1879
  Reviewed-by: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>

                                      [ Murai Takashi <tmurai01@xxxxxxxxx> ]

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

Revision:    hrev53504
Commit:      dfb3c928f87edb68cfb3dda940e15fd8d24a003f
URL:         https://git.haiku-os.org/haiku/commit/?id=dfb3c928f87e
Author:      Murai Takashi <tmurai01@xxxxxxxxx>
Date:        Sat Sep 21 07:00:34 2019 UTC
Committer:   Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
Commit-Date: Sat Sep 21 16:03:09 2019 UTC

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

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

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

diff --git a/src/apps/deskcalc/CalcView.cpp b/src/apps/deskcalc/CalcView.cpp
index dbbb74c5a2..f684fd686b 100644
--- a/src/apps/deskcalc/CalcView.cpp
+++ b/src/apps/deskcalc/CalcView.cpp
@@ -201,7 +201,7 @@ CalcView::CalcView(BMessage* archive)
 
 CalcView::~CalcView()
 {
-       delete fKeypad;
+       delete[] fKeypad;
        delete fOptions;
        free(fKeypadDescription);
        delete fEvaluateMessageRunner;


Other related posts:

  • » [haiku-commits] haiku: hrev53504 - src/apps/deskcalc - Axel Dörfler