Commit 1f578f1b authored by Andrey Astafyev's avatar Andrey Astafyev Committed by Erik de Castro Lopo
Browse files

libFLAC++: Delete decoder and encoder before return if they're not valid

parent 6455e477
......@@ -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");
......
......@@ -215,6 +215,7 @@ static bool test_stream_encoder(Layer layer, bool is_ogg)
printf("testing is_valid()... ");
if(!encoder->is_valid()) {
printf("FAILED, returned false\n");
delete decoder;
return false;
}
printf("OK\n");
......
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