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 <[email protected]>
This commit is contained in:
Murai Takashi
2019-09-21 16:09:51 +00:00
committed by Axel Dörfler
parent 7ddb9624b2
commit 04a1ee9750
+1 -1
View File
@@ -40,7 +40,7 @@ public:
for (int i = 0; i < CRYPTO_num_locks(); i++)
pthread_mutex_destroy(&sMutexBuf[i]);
delete sMutexBuf;
delete[] sMutexBuf;
}
private: