[haiku-commits] haiku: hrev53505 - src/apps/mandelbrot

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

hrev53505 adds 1 changeset to branch 'master'
old head: dfb3c928f87edb68cfb3dda940e15fd8d24a003f
new head: 931aec2b6c8a158732af812473a1a819d05e9f72
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=931aec2b6c8a+%5Edfb3c928f87e

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

931aec2b6c8a: Mandelbrot: Fix 'new[]' array freed with 'delete'
  
  fRenderBuffer is allocated by new[] in MessageReceived(),
  buf freed by delete.
  Pointed out by LGTM.
  
  Change-Id: I06efc1c8075a421e7f2983e8a0d817a1bf43b026
  Reviewed-on: https://review.haiku-os.org/c/haiku/+/1880
  Reviewed-by: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>

                                      [ Murai Takashi <tmurai01@xxxxxxxxx> ]

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

Revision:    hrev53505
Commit:      931aec2b6c8a158732af812473a1a819d05e9f72
URL:         https://git.haiku-os.org/haiku/commit/?id=931aec2b6c8a
Author:      Murai Takashi <tmurai01@xxxxxxxxx>
Date:        Sat Sep 21 07:01:22 2019 UTC
Committer:   Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
Commit-Date: Sat Sep 21 16:04:57 2019 UTC

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

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

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

diff --git a/src/apps/mandelbrot/FractalEngine.cpp 
b/src/apps/mandelbrot/FractalEngine.cpp
index 846b93e5d5..e0927c0549 100644
--- a/src/apps/mandelbrot/FractalEngine.cpp
+++ b/src/apps/mandelbrot/FractalEngine.cpp
@@ -111,7 +111,7 @@ void FractalEngine::MessageReceived(BMessage* msg)
                fResizing = true;
                StopRender();
 
-               delete fRenderBuffer;
+               delete[] fRenderBuffer;
                fRenderBuffer = NULL;
 
                fWidth = msg->GetUInt16("width", 320);


Other related posts:

  • » [haiku-commits] haiku: hrev53505 - src/apps/mandelbrot - Axel Dörfler