From 2e3a66cc31a2f95faaa54e212a6afd670f76b0ad Mon Sep 17 00:00:00 2001 From: Urs Fleisch Date: Sat, 7 Oct 2023 09:18:22 +0200 Subject: [PATCH] Fix memory leak in testParsePodcastFrame() --- tests/test_id3v2.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/test_id3v2.cpp b/tests/test_id3v2.cpp index 50a04ea5..7b72e1fa 100644 --- a/tests/test_id3v2.cpp +++ b/tests/test_id3v2.cpp @@ -803,8 +803,9 @@ public: "\x00\x00" "\x00\x00\x00\x00", 14); const ID3v2::Header header; - CPPUNIT_ASSERT(dynamic_cast( - factory->createFrame(data, &header))); + ID3v2::Frame *frame = factory->createFrame(data, &header); + CPPUNIT_ASSERT(dynamic_cast(frame)); + delete frame; } void testRenderPodcastFrame()