History

Use the correct version of delete within a unit test

This fixes valgrind warnings when running this test. The mismatched delete could also potentially have caused memory corruption issues while running the tests.

Martin Storsjö committed 12 years ago

Commit 58eba541 parent f8d5f931 file · +1 −1Browse files

Showing the changes to test/api/encode_decode_api_test.cpp (1 of 1 file). Show all

Unified · Split

test/api/encode_decode_api_test.cpp+1−1
@@ -405,7 +405,7 @@ int SimulateNALLoss (const unsigned char* pSrc, int& iSrcLen, std::vector<SLost · 404 unmodified lines
405405 memset ((void*)pSrc, 0, iSrcLen);
406406 memcpy ((void*)pSrc, pDst, iDstLen);
407407 iSrcLen = iDstLen;
408− delete pDst;
408+ delete [] pDst;
409409 return iSkipedBytes;
410410 }
411411

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t