[haiku-commits] haiku: hrev53506 - src/apps/pulse

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

hrev53506 adds 1 changeset to branch 'master'
old head: 931aec2b6c8a158732af812473a1a819d05e9f72
new head: 36bf86d2b6114bd2a21ca4edaf7b996921c5da44
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=36bf86d2b611+%5E931aec2b6c8a

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

36bf86d2b611: Pulse: Fix 'new[]' array freed with 'delete'
  
  cpu_menu_items is allocated by new[] in Init(), but freed by delete.
  Pointed out by LGTM.
  
  Change-Id: I4cc669c519cc4ea3e170cb9f421d6b4ff77df8a2
  Reviewed-on: https://review.haiku-os.org/c/haiku/+/1881
  Reviewed-by: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>

                                      [ Murai Takashi <tmurai01@xxxxxxxxx> ]

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

Revision:    hrev53506
Commit:      36bf86d2b6114bd2a21ca4edaf7b996921c5da44
URL:         https://git.haiku-os.org/haiku/commit/?id=36bf86d2b611
Author:      Murai Takashi <tmurai01@xxxxxxxxx>
Date:        Sat Sep 21 07:02:29 2019 UTC
Committer:   Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
Commit-Date: Sat Sep 21 16:06:08 2019 UTC

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

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

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

diff --git a/src/apps/pulse/PulseView.cpp b/src/apps/pulse/PulseView.cpp
index a5e7a85382..857c552284 100644
--- a/src/apps/pulse/PulseView.cpp
+++ b/src/apps/pulse/PulseView.cpp
@@ -158,7 +158,7 @@ void PulseView::ChangeCPUState(BMessage *message) {
 
 PulseView::~PulseView() {
        if (popupmenu != NULL) delete popupmenu;
-       if (cpu_menu_items != NULL) delete cpu_menu_items;
+       if (cpu_menu_items != NULL) delete[] cpu_menu_items;
 
        delete[] prev_active;
        delete[] cpu_times;


Other related posts:

  • » [haiku-commits] haiku: hrev53506 - src/apps/pulse - Axel Dörfler