[haiku-commits] haiku: hrev53502 - src/add-ons/translators/gif

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

hrev53502 adds 1 changeset to branch 'master'
old head: 88dc9ee1b1eae82f2132f5c7c3807bad58cc2fd1
new head: 7fd9865ec6ca857d164e2de867c5944723887cb3
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=7fd9865ec6ca+%5E88dc9ee1b1ea

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

7fd9865ec6ca: translators/gif: Fix mismatching malloc/delete
  
  fHeadMemblock is allocated by malloc() in MemblockAllocate(),
  but freed by delete.
  Pointed out by LGTM.
  
  Change-Id: I5019c2c3e4d240051e6f8a1ac70a9738f6f97131
  Reviewed-on: https://review.haiku-os.org/c/haiku/+/1878
  Reviewed-by: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>

                                      [ Murai Takashi <tmurai01@xxxxxxxxx> ]

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

Revision:    hrev53502
Commit:      7fd9865ec6ca857d164e2de867c5944723887cb3
URL:         https://git.haiku-os.org/haiku/commit/?id=7fd9865ec6ca
Author:      Murai Takashi <tmurai01@xxxxxxxxx>
Date:        Sat Sep 21 06:59:16 2019 UTC
Committer:   Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
Commit-Date: Sat Sep 21 16:00:15 2019 UTC

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

1 file changed, 1 insertion(+), 1 deletion(-)
src/add-ons/translators/gif/GIFLoad.cpp | 2 +-

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

diff --git a/src/add-ons/translators/gif/GIFLoad.cpp 
b/src/add-ons/translators/gif/GIFLoad.cpp
index 3196e5fbc9..03cd37ad8a 100644
--- a/src/add-ons/translators/gif/GIFLoad.cpp
+++ b/src/add-ons/translators/gif/GIFLoad.cpp
@@ -601,7 +601,7 @@ GIFLoad::MemblockDeleteAll()
        while (fHeadMemblock != NULL) {
                // delete the linked list
                block = fHeadMemblock->next;
-               delete fHeadMemblock;
+               free(fHeadMemblock);
                fHeadMemblock = block;
        }
 }


Other related posts:

  • » [haiku-commits] haiku: hrev53502 - src/add-ons/translators/gif - Axel Dörfler