2
0
Эх сурвалжийг харах

stb_vorbis: Fix memory leak in start_decoder().

Jörn Heusipp 9 жил өмнө
parent
commit
aeba55604a
1 өөрчлөгдсөн 1 нэмэгдсэн , 2 устгасан
  1. 1 2
      stb_vorbis.c

+ 1 - 2
stb_vorbis.c

@@ -3810,7 +3810,6 @@ static int start_decoder(vorb *f)
                   }
                }
             }
-            setup_temp_free(f, mults,sizeof(mults[0])*c->lookup_values);
             c->lookup_type = 2;
          }
          else
@@ -3826,11 +3825,11 @@ static int start_decoder(vorb *f)
                if (c->sequence_p)
                   last = val;
             }
-            setup_temp_free(f, mults,sizeof(mults[0])*c->lookup_values);
          }
 #ifndef STB_VORBIS_DIVIDES_IN_CODEBOOK
         skip:;
 #endif
+         setup_temp_free(f, mults, sizeof(mults[0])*c->lookup_values);
 
          CHECK(f);
       }