From patchwork Thu Dec 8 23:08:10 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Cadhalpun X-Patchwork-Id: 1728 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.65.86 with SMTP id o83csp3106vsa; Thu, 8 Dec 2016 15:16:31 -0800 (PST) X-Received: by 10.194.162.8 with SMTP id xw8mr12788166wjb.125.1481238991205; Thu, 08 Dec 2016 15:16:31 -0800 (PST) Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id w4si31286728wja.236.2016.12.08.15.16.30; Thu, 08 Dec 2016 15:16:31 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@googlemail.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org; dmarc=fail (p=QUARANTINE dis=NONE) header.from=googlemail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 57888689FC9; Fri, 9 Dec 2016 01:16:25 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wm0-f51.google.com (mail-wm0-f51.google.com [74.125.82.51]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0BE38689FA5 for ; Fri, 9 Dec 2016 01:16:19 +0200 (EET) Received: by mail-wm0-f51.google.com with SMTP id t79so1809026wmt.0 for ; Thu, 08 Dec 2016 15:16:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=from:to:subject:message-id:date:user-agent:mime-version :content-transfer-encoding; bh=L0xUnFNSYQSVeiabQmLkrZDZ2A12IXC2IQ62xkUAYA8=; b=WW/1ShiTkzmLUYUGzVHSDPV13zGnwxE1AUzGrRBJksZzMzYDkrIItrRaY6iLssCcS7 RLb3PpYnz539ww38m5/sb67WePpdWIXsUi4uhj1ru04yrfd9Jy3VL1heEnFNUXTaI1VN 0/i2+H5x2Yz9EtTa8TakRD4tc4qyz87kyrSUSC0A13VTTU7Tr3Vt5myoPZlJoDeu2b2P kAXRIGAmLD5hesZFknBVMyAzoznPetvuV76mpqWVgUrlBE6XdUT1wZTTJ8I+sqjyVvjg FfGH/dKeOiJHPByTJR9f2B3jZcFCP3SCuewWqe9V23xq1+dBI1c/710zRhXh1DJSl5Ge LYjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:message-id:date:user-agent :mime-version:content-transfer-encoding; bh=L0xUnFNSYQSVeiabQmLkrZDZ2A12IXC2IQ62xkUAYA8=; b=YjWfUIbYKJIt2CKJx83rBi19wwuqzgODqMR8cy3bP0yE30ZrOv+10QVrd5vL0AF+5b W376lxUHihJ0YavZ4WD4ibvzuWWIVhZRXe4vlOdhQzV9vizW2GxfpiMRV7qLip62jIEO D6kYmGHsYrGih/PQuPZg+PSkaFzAu0a1G5UUHf9jU1fZlqiluun4R99ArRAahDlGbFv6 9FoJXNdfWaChHH9epE93nd5mOAHtt5pk4pDwxOCAR/9BnuVVv2jvGaSjHfeXWhAM2gPS dtxsQlBVXCIeZlg1dA1+h+RY0kTWYnRUSrre+vf1EZsG2rJWNV2dOlZ8cODK8zG8LpOX Ve0g== X-Gm-Message-State: AKaTC00EZICpE8ocZjQ5P9fzXlxM/bUeldSeGNbS8TSAv03aQM7LODk6OUXGYSBHXptwMQ== X-Received: by 10.28.45.212 with SMTP id t203mr4348523wmt.46.1481238492322; Thu, 08 Dec 2016 15:08:12 -0800 (PST) Received: from [192.168.2.21] (p5B0959BE.dip0.t-ipconnect.de. [91.9.89.190]) by smtp.googlemail.com with ESMTPSA id l6sm17582808wmd.5.2016.12.08.15.08.11 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Dec 2016 15:08:11 -0800 (PST) From: Andreas Cadhalpun X-Google-Original-From: Andreas Cadhalpun To: FFmpeg development discussions and patches Message-ID: Date: Fri, 9 Dec 2016 00:08:10 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.4.0 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 1/2] opus_parser: fix leaking channel_maps on error X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Signed-off-by: Andreas Cadhalpun --- libavcodec/opus_parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/opus_parser.c b/libavcodec/opus_parser.c index c30fd7b..21a73ee 100644 --- a/libavcodec/opus_parser.c +++ b/libavcodec/opus_parser.c @@ -116,11 +116,11 @@ static int opus_find_frame_end(AVCodecParserContext *ctx, AVCodecContext *avctx, if (avctx->extradata && !s->extradata_parsed) { ret = ff_opus_parse_extradata(avctx, &s->ctx); + av_freep(&s->ctx.channel_maps); if (ret < 0) { av_log(avctx, AV_LOG_ERROR, "Error parsing Ogg extradata.\n"); return AVERROR_INVALIDDATA; } - av_freep(&s->ctx.channel_maps); s->extradata_parsed = 1; }