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 <jerome.duval@gmail.com>
This commit is contained in:
Murai Takashi 2021-02-18 06:12:05 +09:00 committed by Jérôme Duval
parent c05253c64e
commit 08f49f01e3

View File

@ -34,7 +34,7 @@ MovePLItemsCommand::MovePLItemsCommand(Playlist* playlist,
{
if (indices.IsEmpty()) {
// indicate a bad object state
delete fItems;
delete[] fItems;
fItems = NULL;
return;
}