From 4b4dee09adbb555e794c5fec2733f5fd517885d2 Mon Sep 17 00:00:00 2001 From: cantabile Date: Thu, 20 Apr 2017 17:06:32 +0300 Subject: sd_lavc: Free extradata in case of init error --- sub/sd_lavc.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sub') diff --git a/sub/sd_lavc.c b/sub/sd_lavc.c index 26318cf4b4..59e10ab5a9 100644 --- a/sub/sd_lavc.c +++ b/sub/sd_lavc.c @@ -113,6 +113,8 @@ static int init(struct sd *sd) error: MP_FATAL(sd, "Could not open libavcodec subtitle decoder\n"); + if (ctx) + av_free(ctx->extradata); av_free(ctx); talloc_free(priv); return -1; -- cgit v1.2.3