summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Matthews <tmatth@videolan.org>2017-11-09 02:30:14 -0500
committerTristan Matthews <tmatth@videolan.org>2017-11-10 12:50:36 -0500
commit10064bfdd51f7c59aa7724c206aae84b62def5e8 (patch)
tree93387d9daf775996d0f5a50b242193e5180b5b54
parent8ef0f8058854b2ef55d2d42bbe84487a9aadae12 (diff)
downloadlibvorbis-git-10064bfdd51f7c59aa7724c206aae84b62def5e8.tar.gz
vorbis: avoid invalid free
Regression started at commit "4b67376 Remove multiple subtly different inline..."
-rw-r--r--lib/info.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/info.c b/lib/info.c
index 971f004a..fe759edf 100644
--- a/lib/info.c
+++ b/lib/info.c
@@ -647,7 +647,7 @@ int vorbis_analysis_headerout(vorbis_dsp_state *v,
memset(op_code,0,sizeof(*op_code));
if(b){
- oggpack_writeclear(&opb);
+ if(vi->channels>0)oggpack_writeclear(&opb);
if(b->header)_ogg_free(b->header);
if(b->header1)_ogg_free(b->header1);
if(b->header2)_ogg_free(b->header2);