From 98eed74bf59be7192e7e87bc89de06bf9cbe34a2 Mon Sep 17 00:00:00 2001 From: Gregory Maxwell <greg@xiph.org> Date: Thu, 9 Aug 2012 07:22:44 -0400 Subject: [PATCH] Avoid an inconsequential memory leak in tests/test_opus_decode.c. Match up the exit behavior when the no-fuzz enviroment variable is set. --- tests/test_opus_decode.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/test_opus_decode.c b/tests/test_opus_decode.c index ea970927b..2c6a872ad 100644 --- a/tests/test_opus_decode.c +++ b/tests/test_opus_decode.c @@ -198,8 +198,15 @@ int test_decoder_code0(int no_fuzz) if(no_fuzz) { fprintf(stdout," Skipping many tests which fuzz the decoder as requested.\n"); + free(decbak); for(t=0;t<5*2;t++)opus_decoder_destroy(dec[t]); printf(" Decoders stopped.\n"); + + err=0; + for(i=0;i<8*2;i++)err|=outbuf_int[i]!=32749; + for(i=MAX_FRAME_SAMP*2;i<(MAX_FRAME_SAMP+8)*2;i++)err|=outbuf[i]!=32749; + if(err)test_failed(); + free(outbuf_int); free(packet); return 0; -- GitLab