hrev53509 adds 1 changeset to branch 'master'
old head: 04a1ee975092edd59e7b0d3a19a05ebd5ba946b8
new head: 863eb82bcae34284e8c9e5db58925c90ceb479b4
overview:
https://git.haiku-os.org/haiku/log/?qt=range&q=863eb82bcae3+%5E04a1ee975092
----------------------------------------------------------------------------
863eb82bcae3: preferences/sounds: Fix mismatching malloc/delete
fType is allocated by strdup() in SetType(), buf freed by delete.
Pointed out by LGTM.
Change-Id: Id9e900863bf6921fd29f2c8abbd21da182f9055c
Reviewed-on: https://review.haiku-os.org/c/haiku/+/1884
Reviewed-by: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
[ Murai Takashi <tmurai01@xxxxxxxxx> ]
----------------------------------------------------------------------------
Revision: hrev53509
Commit: 863eb82bcae34284e8c9e5db58925c90ceb479b4
URL: https://git.haiku-os.org/haiku/commit/?id=863eb82bcae3
Author: Murai Takashi <tmurai01@xxxxxxxxx>
Date: Sat Sep 21 07:06:50 2019 UTC
Committer: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
Commit-Date: Sat Sep 21 16:11:10 2019 UTC
----------------------------------------------------------------------------
1 file changed, 2 insertions(+), 2 deletions(-)
src/preferences/sounds/HEventList.cpp | 4 ++--
----------------------------------------------------------------------------
diff --git a/src/preferences/sounds/HEventList.cpp
b/src/preferences/sounds/HEventList.cpp
index 5e7edd04f4..c3df32c163 100644
--- a/src/preferences/sounds/HEventList.cpp
+++ b/src/preferences/sounds/HEventList.cpp
@@ -70,7 +70,7 @@ HEventList::HEventList(const char* name)
HEventList::~HEventList()
{
RemoveAll();
- delete fType;
+ free(fType);
}
@@ -80,7 +80,7 @@ HEventList::SetType(const char* type)
RemoveAll();
BMediaFiles mfiles;
mfiles.RewindRefs(type);
- delete fType;
+ free(fType);
fType = strdup(type);
BString name;