diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2018-09-08 15:15:08 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2018-09-08 15:15:08 +0200 |
commit | a3d8481bb628ce254b43198f78a9f14617fa5bf9 (patch) | |
tree | ed26b1a68317adb771bc4484aa2d5e1b226330ae /sys | |
parent | 96210d79b29eb31c6958c7aada57f39dc7f6cdcf (diff) |
libvorbis: fix broken free() (thanks mischief)
Diffstat (limited to 'sys')
-rw-r--r-- | sys/src/cmd/audio/libvorbis/mdct.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/src/cmd/audio/libvorbis/mdct.c b/sys/src/cmd/audio/libvorbis/mdct.c index 1f0ee3c53..d6db82227 100644 --- a/sys/src/cmd/audio/libvorbis/mdct.c +++ b/sys/src/cmd/audio/libvorbis/mdct.c @@ -495,7 +495,8 @@ void mdct_forward(mdct_lookup *init, DATA_TYPE *in, DATA_TYPE *out){ int n2=n>>1; int n4=n>>2; int n8=n>>3; - DATA_TYPE *w=malloc(n*sizeof(*w)); /* forward needs working space */ + DATA_TYPE *wbuf=malloc(n*sizeof(DATA_TYPE)); /* forward needs working space */ + DATA_TYPE *w=wbuf; DATA_TYPE *w2=w+n2; /* rotate */ @@ -560,5 +561,5 @@ void mdct_forward(mdct_lookup *init, DATA_TYPE *in, DATA_TYPE *out){ w+=2; T+=2; } - free(w); + free(wbuf); } |