[haiku-commits] haiku: hrev52450 - src/add-ons/screen_savers/message

  • From: waddlesplash@xxxxxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sun, 28 Oct 2018 17:22:22 -0400 (EDT)

hrev52450 adds 1 changeset to branch 'master'
old head: aed889ae614243392b58ce6e58356b399bdab8f5
new head: 8ff74b67d4a034308345e3fb9bc91a5da6e16235
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=8ff74b67d4a0+%5Eaed889ae6142

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

8ff74b67d4a0: screen_savers/message: Use delete[] instead of delete
  
  Use delete[] instead of delete, since memory is allocated by new[]
  at line 139.
  
  Pointed out by clang.
  
  Change-Id: I70396283b8d2c01d52886f7543804998d891ea44
  Reviewed-on: https://review.haiku-os.org/646
  Reviewed-by: waddlesplash <waddlesplash@xxxxxxxxx>

                                      [ Murai Takashi <tmurai01@xxxxxxxxx> ]

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

Revision:    hrev52450
Commit:      8ff74b67d4a034308345e3fb9bc91a5da6e16235
URL:         https://git.haiku-os.org/haiku/commit/?id=8ff74b67d4a0
Author:      Murai Takashi <tmurai01@xxxxxxxxx>
Date:        Sun Oct 28 10:55:30 2018 UTC
Committer:   waddlesplash <waddlesplash@xxxxxxxxx>
Commit-Date: Sun Oct 28 21:22:18 2018 UTC

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

1 file changed, 1 insertion(+), 1 deletion(-)
src/add-ons/screen_savers/message/Message.cpp | 2 +-

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

diff --git a/src/add-ons/screen_savers/message/Message.cpp 
b/src/add-ons/screen_savers/message/Message.cpp
index cd6eb9f84a..50e6640343 100644
--- a/src/add-ons/screen_savers/message/Message.cpp
+++ b/src/add-ons/screen_savers/message/Message.cpp
@@ -112,7 +112,7 @@ Message::~Message()
 {
        for (int32 i = 0; i < fFontFamilies.CountItems(); i++) {
                if (fFontFamilies.ItemAt(i))
-                       delete fFontFamilies.ItemAt(i);
+                       delete[] fFontFamilies.ItemAt(i);
        }
 }
 


Other related posts:

  • » [haiku-commits] haiku: hrev52450 - src/add-ons/screen_savers/message - waddlesplash