Fix another non-array delete on an array

Arrays should generally be deleted with delete[]. Also, this operator's behaviour (as well as the normal delete's) is well defined on null pointers (it's a no-op), so the if is totally needless.
master
Daniel Kamil Kozar 2021-02-04 00:49:50 +01:00 committed by GitHub
parent 0821aa6315
commit 16a9c2885d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -89,8 +89,7 @@ class VC1Unit
}
inline int vc1_unescape_buffer(uint8_t* src, int size)
{
if (m_nalBuffer != 0)
delete m_nalBuffer;
delete[] m_nalBuffer;
m_nalBuffer = new uint8_t[size];
int dsize = 0, i;
if (size < 4)