[haiku-commits] haiku: hrev53508 - src/kits/network/libnetapi

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

hrev53508 adds 1 changeset to branch 'master'
old head: 7ddb9624b23605ee64a176e73d222a2b74f424fa
new head: 04a1ee975092edd59e7b0d3a19a05ebd5ba946b8
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=04a1ee975092+%5E7ddb9624b236

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

04a1ee975092: libnetapi: Fix 'new[]' array freed with 'delete'
  
  sMutexBuf is allocated by new[] in SSL::SSL(), but freed by delete.
  Pointed by LGTM.
  
  Change-Id: Ic16501883be4e3b7ca5fe24e1585b6e14ae3ff36
  Reviewed-on: https://review.haiku-os.org/c/haiku/+/1883
  Reviewed-by: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>

                                      [ Murai Takashi <tmurai01@xxxxxxxxx> ]

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

Revision:    hrev53508
Commit:      04a1ee975092edd59e7b0d3a19a05ebd5ba946b8
URL:         https://git.haiku-os.org/haiku/commit/?id=04a1ee975092
Author:      Murai Takashi <tmurai01@xxxxxxxxx>
Date:        Sat Sep 21 07:05:15 2019 UTC
Committer:   Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
Commit-Date: Sat Sep 21 16:09:51 2019 UTC

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

1 file changed, 1 insertion(+), 1 deletion(-)
src/kits/network/libnetapi/SSL.cpp | 2 +-

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

diff --git a/src/kits/network/libnetapi/SSL.cpp 
b/src/kits/network/libnetapi/SSL.cpp
index c8cb75cd2a..c3cb8e6539 100644
--- a/src/kits/network/libnetapi/SSL.cpp
+++ b/src/kits/network/libnetapi/SSL.cpp
@@ -40,7 +40,7 @@ public:
 
                for (int i = 0; i < CRYPTO_num_locks(); i++)
                        pthread_mutex_destroy(&sMutexBuf[i]);
-               delete sMutexBuf;
+               delete[] sMutexBuf;
        }
 
 private:


Other related posts:

  • » [haiku-commits] haiku: hrev53508 - src/kits/network/libnetapi - Axel Dörfler