summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSigrid <ftrvxmtrx@gmail.com>2021-01-11 16:17:48 +0100
committerSigrid <ftrvxmtrx@gmail.com>2021-01-11 16:17:48 +0100
commitc789c054808dc3984abfb0d6b7de6d12e66471c2 (patch)
tree142d7f877be4a58f3e9cb5aebcdaa6138fffde0e
parentce82f6750c5d98968259b80614643ed63b972ea3 (diff)
downloadplan9front-c789c054808dc3984abfb0d6b7de6d12e66471c2.tar.xz
libvorbis: fix free() called on a wrong pointer
-rw-r--r--sys/src/cmd/audio/libvorbis/mdct.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/src/cmd/audio/libvorbis/mdct.c b/sys/src/cmd/audio/libvorbis/mdct.c
index 09c905826..5eb34754e 100644
--- a/sys/src/cmd/audio/libvorbis/mdct.c
+++ b/sys/src/cmd/audio/libvorbis/mdct.c
@@ -495,7 +495,7 @@ void mdct_forward(mdct_lookup *init, DATA_TYPE *in, DATA_TYPE *out){
int n4=n>>2;
int n8=n>>3;
DATA_TYPE *w=malloc(n*sizeof(*w)); /* forward needs working space */
- DATA_TYPE *w2=w+n2;
+ DATA_TYPE *w2=w+n2, *wbuf=w;
/* rotate */
@@ -559,5 +559,5 @@ void mdct_forward(mdct_lookup *init, DATA_TYPE *in, DATA_TYPE *out){
w+=2;
T+=2;
}
- free(w);
+ free(wbuf);
}