shithub: opus

Download patch

ref: 98eed74bf59be7192e7e87bc89de06bf9cbe34a2
parent: 4ee682f52ad704fbe8b8350036e9744da22d3a12
author: Gregory Maxwell <[email protected]>
date: Thu Aug 9 03:22:44 EDT 2012

Avoid an inconsequential memory leak in tests/test_opus_decode.c.

Match up the exit behavior when the no-fuzz enviroment variable
is set.

--- a/tests/test_opus_decode.c
+++ b/tests/test_opus_decode.c
@@ -198,8 +198,15 @@
    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;