summaryrefslogtreecommitdiff
path: root/libavcodec/truemotion2.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2013-09-16 21:03:34 +0300
committerMartin Storsjö <martin@martin.st>2013-09-17 11:33:38 +0300
commitc39f7eba01cd656e8f0eed592f93d11814736650 (patch)
treefdb36770caa870f62a5b83f438b91025efa2d9c8 /libavcodec/truemotion2.c
parentf875a732e36786d49f3650e3235272891a820600 (diff)
truemotion2: Use av_freep properly in an error path
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'libavcodec/truemotion2.c')
-rw-r--r--libavcodec/truemotion2.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/libavcodec/truemotion2.c b/libavcodec/truemotion2.c
index a4d01cb0c5..4d23f56565 100644
--- a/libavcodec/truemotion2.c
+++ b/libavcodec/truemotion2.c
@@ -929,14 +929,14 @@ static av_cold int decode_init(AVCodecContext *avctx)
if (!l->Y1_base || !l->Y2_base || !l->U1_base ||
!l->V1_base || !l->U2_base || !l->V2_base ||
!l->last || !l->clast) {
- av_freep(l->Y1_base);
- av_freep(l->Y2_base);
- av_freep(l->U1_base);
- av_freep(l->U2_base);
- av_freep(l->V1_base);
- av_freep(l->V2_base);
- av_freep(l->last);
- av_freep(l->clast);
+ av_freep(&l->Y1_base);
+ av_freep(&l->Y2_base);
+ av_freep(&l->U1_base);
+ av_freep(&l->U2_base);
+ av_freep(&l->V1_base);
+ av_freep(&l->V2_base);
+ av_freep(&l->last);
+ av_freep(&l->clast);
return AVERROR(ENOMEM);
}
l->Y1 = l->Y1_base + l->y_stride * 4 + 4;