From Murai Takashi <tmurai01@xxxxxxxxx>:
Murai Takashi has uploaded this change for review. (
https://review.haiku-os.org/c/haiku/+/3746 ;)
Change subject: mediaplayer: Fix new[] / delete mismatch
......................................................................
mediaplayer: Fix new[] / delete mismatch
fItems are allocated by new[] at line 31, but deallocated by delete.
Pointed out by Clang Static Analyzer.
Change-Id: I1d8ae0b2214290155612d4b5c6d1ce56676cc892
---
M src/apps/mediaplayer/playlist/MovePLItemsCommand.cpp
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://git.haiku-os.org:22/haiku refs/changes/46/3746/1
diff --git a/src/apps/mediaplayer/playlist/MovePLItemsCommand.cpp
b/src/apps/mediaplayer/playlist/MovePLItemsCommand.cpp
index 6e28a10..989db8f 100644
--- a/src/apps/mediaplayer/playlist/MovePLItemsCommand.cpp
+++ b/src/apps/mediaplayer/playlist/MovePLItemsCommand.cpp
@@ -34,7 +34,7 @@
{
if (indices.IsEmpty()) {
// indicate a bad object state
- delete fItems;
+ delete[] fItems;
fItems = NULL;
return;
}
--
To view, visit https://review.haiku-os.org/c/haiku/+/3746
To unsubscribe, or for help writing mail filters, visit
https://review.haiku-os.org/settings
Gerrit-Project: haiku
Gerrit-Branch: master
Gerrit-Change-Id: I1d8ae0b2214290155612d4b5c6d1ce56676cc892
Gerrit-Change-Number: 3746
Gerrit-PatchSet: 1
Gerrit-Owner: Murai Takashi <tmurai01@xxxxxxxxx>
Gerrit-MessageType: newchange