Commit a8aa9ab9 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix mem leak found by asan

parent fab681ea
......@@ -52,9 +52,9 @@ namespace ReaderTestHelpersUnitTest
#define KVOCREADER_EXPECT_CORE(str, eError, eType, isGood) \
do { \
QByteArray array( str.toLatin1() ); \
QBuffer * buffer = new QBuffer( &array ); \
buffer->open( QIODevice::ReadOnly ); \
ReaderManager::ReaderPtr reader( ReaderManager::reader(*buffer ) ); \
QBuffer buffer( &array ); \
buffer.open( QIODevice::ReadOnly ); \
ReaderManager::ReaderPtr reader( ReaderManager::reader(buffer ) ); \
KEduVocDocument docRead; \
KEduVocDocument::ErrorCode actualError(reader->read(docRead ) ); \
KEduVocDocument::FileType actualType(reader->fileTypeHandled() ); \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment