From patchwork Sat Sep 19 16:36:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andreas Rheinhardt X-Patchwork-Id: 22495 Return-Path: X-Original-To: patchwork@ffaux-bg.ffmpeg.org Delivered-To: patchwork@ffaux-bg.ffmpeg.org Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by ffaux.localdomain (Postfix) with ESMTP id 036CD44A83E for ; Sat, 19 Sep 2020 19:37:35 +0300 (EEST) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id D9F9268B875; Sat, 19 Sep 2020 19:37:34 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 984E868B72C for ; Sat, 19 Sep 2020 19:37:27 +0300 (EEST) Received: by mail-wr1-f66.google.com with SMTP id k15so8579592wrn.10 for ; Sat, 19 Sep 2020 09:37:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pwIqOJt03STTa3+VihclEZel3mrWwQnEdpQ3cd8eVW4=; b=tApGokeYG9SCjAwZ8yc3++ArJBMhTdaP9CSh/Q3A6+J5zizxK+EeCKmKHts9r7Oc/2 vCr4E90d2B1kVFqf3QCVBcvOsl63NEkZwTewTPO+cR70RJ7VOEDNm4DhSt31vAYnXIUr b5NJ3LNtx0rt4Ik54grDzLQqlmWI75HyiC5a3iZMTnrT+/Sb7XRA+FARiIGSIZrIoAlu 92bzuEr9tPvGALzTl5GxEsFOlbHcaGBahnftVFOfCEsdaFvjD3J1uuaMOw/drQ2Iw7QF YEg5hZ9nAQA76mL4OquYncC8+uWiOqmbDZtGuTvEBEMx9OA60yZdeh7t8aChN2rQR3Lj exyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pwIqOJt03STTa3+VihclEZel3mrWwQnEdpQ3cd8eVW4=; b=N+2ob1JPoPj/D4ONgegtjl2ioww8rCSHzRQO9zF++sPJCGYmrN2dy3tEjS6CGXIZpw g0FrUAONchqAyyWrUmGU3yuXDix6h7DrMKSgqvc0eZmTNpHv67MSM+GpuCdg+gRTi684 eTJs+Dd0kCG5y+yUTJZda2c2PvbrEk6dzNTqm+unIZ31mjqCY6etkmwzFgo187cqj5fS uWLErEoh0vo+HQaOr8eZBt5vKOPbn4apmsurQBQ19mW4sMlnyRe6GRg2+6sE/rEDMo2U cofBN/qsgq3pNiV7PL9q9sthfvq519UF/U99bl/+vZlOqXHfdnjMVgEXqPoPaG1h8Y2y SpsQ== X-Gm-Message-State: AOAM533PCN80POsmmar6EIv2AE6JKEV29a5F4XgKkWH4SLpUvKIszsl+ IyGZgr550MBN2C7gGtvdepjoIRb60Vg= X-Google-Smtp-Source: ABdhPJwouJzFzslFFvRzqlqlxhvtBAdxwRVBopuxo+48JGBjxz7+9EUHiWQQeKKvJlJLwjKtKa7YNA== X-Received: by 2002:adf:e54f:: with SMTP id z15mr41968300wrm.136.1600533446763; Sat, 19 Sep 2020 09:37:26 -0700 (PDT) Received: from sblaptop.fritz.box (ipbcc1fb0f.dynamic.kabel-deutschland.de. [188.193.251.15]) by smtp.gmail.com with ESMTPSA id d5sm12451137wrb.28.2020.09.19.09.37.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 19 Sep 2020 09:37:25 -0700 (PDT) From: Andreas Rheinhardt To: ffmpeg-devel@ffmpeg.org Date: Sat, 19 Sep 2020 18:36:03 +0200 Message-Id: <20200919163610.1099233-14-andreas.rheinhardt@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200919163610.1099233-1-andreas.rheinhardt@gmail.com> References: <20200919163610.1099233-1-andreas.rheinhardt@gmail.com> MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH 14/21] avformat/dashdec: Fix leak of representation languages 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 Cc: Andreas Rheinhardt Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" These languages are normally freed after having been added as metadata to their respective AVStreams. Yet if one never reaches said point, they leak. This can happen as a result of an error when reading the header or as a result of refreshing the manifests. Signed-off-by: Andreas Rheinhardt --- libavformat/dashdec.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/dashdec.c b/libavformat/dashdec.c index ca2c2b5fd2..4d4611ef04 100644 --- a/libavformat/dashdec.c +++ b/libavformat/dashdec.c @@ -359,6 +359,7 @@ static void free_representation(struct representation *pls) } av_freep(&pls->url_template); + av_freep(&pls->lang); av_freep(&pls); }