summaryrefslogtreecommitdiff
path: root/avconv_vaapi.c
diff options
context:
space:
mode:
authorMark Thompson <sw@jkqxz.net>2016-05-09 18:53:48 +0100
committerLuca Barbato <lu_zero@gentoo.org>2016-05-10 11:30:25 +0200
commit0c1d66a07917602303f129f5a5651faeec2415d5 (patch)
tree887138c3b16ac80c803ecd491c6ad7e5e603df1b /avconv_vaapi.c
parent885a9d6087315a85d98f7e89656ef01dc7104c4c (diff)
avconv_vaapi: fix double-free with some unsupported streams
Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
Diffstat (limited to 'avconv_vaapi.c')
-rw-r--r--avconv_vaapi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/avconv_vaapi.c b/avconv_vaapi.c
index a385236cc9..36b34e8cda 100644
--- a/avconv_vaapi.c
+++ b/avconv_vaapi.c
@@ -243,7 +243,7 @@ static int vaapi_build_decoder_config(VAAPIDecoderContext *ctx,
alt_profile = vaapi_profile_map[i].codec_profile;
}
}
- av_free(profile_list);
+ av_freep(&profile_list);
if (profile == VAProfileNone) {
av_log(ctx, loglevel, "No VAAPI support for codec %s.\n",
@@ -374,7 +374,7 @@ fail:
av_hwframe_constraints_free(&constraints);
av_freep(&hwconfig);
vaDestroyConfig(hwctx->display, ctx->va_config);
- av_free(profile_list);
+ av_freep(&profile_list);
return err;
}