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
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3746
Reviewed-by: Jérôme Duval <[email protected]>
This commit is contained in:
Murai Takashi
2021-02-18 14:35:32 +00:00
committed by Jérôme Duval
parent c05253c64e
commit 08f49f01e3
@@ -34,7 +34,7 @@ MovePLItemsCommand::MovePLItemsCommand(Playlist* playlist,
{
if (indices.IsEmpty()) {
// indicate a bad object state
delete fItems;
delete[] fItems;
fItems = NULL;
return;
}