aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-12-10 18:30:44 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-12-10 18:30:44 +0100
commit7fa9f7ef1c2f0cee81ec6ea6a4ff10af4c4fc62c (patch)
tree98781a8b74b9bda7c33e864d50c35ea898335875
parentf90281ca97d45a87e3671f5e6e64794f2632fef2 (diff)
downloadffmpeg-7fa9f7ef1c2f0cee81ec6ea6a4ff10af4c4fc62c.tar.gz
dvdsub_parse_extradata: fix memleak
Fixes CID1135765 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/dvdsubdec.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/dvdsubdec.c b/libavcodec/dvdsubdec.c
index 31ce0accc6..637f3e6147 100644
--- a/libavcodec/dvdsubdec.c
+++ b/libavcodec/dvdsubdec.c
@@ -599,8 +599,10 @@ static int dvdsub_parse_extradata(AVCodecContext *avctx)
int w, h;
if (sscanf(data + 5, "%dx%d", &w, &h) == 2) {
int ret = ff_set_dimensions(avctx, w, h);
- if (ret < 0)
+ if (ret < 0) {
+ av_free(dataorig);
return ret;
+ }
}
}