diff options
author | Andrey Astafyev <dev@246060.ru> | 2019-11-30 08:30:18 +0300 |
---|---|---|
committer | Erik de Castro Lopo <erikd@mega-nerd.com> | 2019-12-08 20:34:57 +1100 |
commit | 1f578f1b71bf5937d0084f91ad1d30ad1f5b79d4 (patch) | |
tree | dc8ee7ccc633d0017a1386c4f46c6e04fb6084f1 /src/test_libFLAC++/decoders.cpp | |
parent | 6455e477218360899c55f8dbd06c6628260d4123 (diff) | |
download | flac-1f578f1b71bf5937d0084f91ad1d30ad1f5b79d4.tar.gz |
libFLAC++: Delete decoder and encoder before return if they're not valid
Diffstat (limited to 'src/test_libFLAC++/decoders.cpp')
-rw-r--r-- | src/test_libFLAC++/decoders.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/test_libFLAC++/decoders.cpp b/src/test_libFLAC++/decoders.cpp index b1505eeb..a937f1fc 100644 --- a/src/test_libFLAC++/decoders.cpp +++ b/src/test_libFLAC++/decoders.cpp @@ -459,6 +459,7 @@ static bool test_stream_decoder(Layer layer, bool is_ogg) printf("testing is_valid()... "); if(!decoder->is_valid()) { printf("FAILED, returned false\n"); + delete decoder; return false; } printf("OK\n"); @@ -481,6 +482,7 @@ static bool test_stream_decoder(Layer layer, bool is_ogg) printf("testing is_valid()... "); if(!decoder->is_valid()) { printf("FAILED, returned false\n"); + delete decoder; return false; } printf("OK\n"); @@ -532,6 +534,7 @@ static bool test_stream_decoder(Layer layer, bool is_ogg) printf("testing is_valid()... "); if(!decoder->is_valid()) { printf("FAILED, returned false\n"); + delete decoder; return false; } printf("OK\n"); |