Message ID | 1479101494-12007-1-git-send-email-sw0312.kim@samsung.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <dri-devel-bounces@lists.freedesktop.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 3F28D60471 for <patchwork-dri-devel@patchwork.kernel.org>; Mon, 14 Nov 2016 05:30:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 265302882C for <patchwork-dri-devel@patchwork.kernel.org>; Mon, 14 Nov 2016 05:30:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 17425288F3; Mon, 14 Nov 2016 05:30:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 7A3852882C for <patchwork-dri-devel@patchwork.kernel.org>; Mon, 14 Nov 2016 05:30:56 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 90C2E6E109; Mon, 14 Nov 2016 05:30:52 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) by gabe.freedesktop.org (Postfix) with ESMTPS id 708BB6E10B for <dri-devel@lists.freedesktop.org>; Mon, 14 Nov 2016 05:30:50 +0000 (UTC) Received: from epcpsbgm1new.samsung.com (epcpsbgm1 [203.254.230.26]) by mailout1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OGM01CSX9Z4KPA0@mailout1.samsung.com> for dri-devel@lists.freedesktop.org; Mon, 14 Nov 2016 14:30:47 +0900 (KST) X-AuditID: cbfee61a-f79916d0000062de-5a-58294c07230b Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1new.samsung.com (EPCPMTA) with SMTP id C4.75.25310.70C49285; Mon, 14 Nov 2016 14:30:47 +0900 (KST) Received: from localhost.localdomain ([10.113.62.209]) by mmp2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OGM009829ZABJ90@mmp2.samsung.com>; Mon, 14 Nov 2016 14:30:47 +0900 (KST) From: Seung-Woo Kim <sw0312.kim@samsung.com> To: dri-devel@lists.freedesktop.org, robclark@freedesktop.org, inki.dae@samsung.com Subject: [PATCH libdrm] libkms/exynos: fix memory leak in error path Date: Mon, 14 Nov 2016 14:31:34 +0900 Message-id: <1479101494-12007-1-git-send-email-sw0312.kim@samsung.com> X-Mailer: git-send-email 1.7.4.1 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrPLMWRmVeSWpSXmKPExsVy+t9jQV12H80Ig8U39S2ufH3PZjHp/gQW ixf3LrJYTGnOtZgx+SWbA6vHqjkbWD3udx9n8ujbsooxgDnKzSYjNTEltUghNS85PyUzL91W KTTETddCSSEvMTfVVilC1zckSEmhLDGnFMgzMkADDs4B7sFK+nYJbhnvd89iLXjJUrFl3Un2 BsYHzF2MHBwSAiYS53YYdTFyApliEhfurWfrYuTiEBKYxShx7ek2VgjnB6PE9Q2fWUGq2AR0 JPYv+Q1miwiESmxb+okJZBCzgLHE3UvOIGFhAReJ/w/msYDYLAKqEse2/wOzeQXcJKYtO8gM sUxBYsG9t2wTGLkXMDKsYpRILUguKE5KzzXMSy3XK07MLS7NS9dLzs/dxAgOvGdSOxgP7nI/ xCjAwajEw3vATDNCiDWxrLgy9xCjBAezkgivqw1QiDclsbIqtSg/vqg0J7X4EKMp0AETmaVE k/OBUZFXEm9oYm5ibmxgYW5paWKkJM7bOPtZuJBAemJJanZqakFqEUwfEwenVAOjKofPvnnG a6T+qk/WyDlofOj8e+7QlXpv9DU/c7iYpEoZSJpNCJa+vIdzVqie4Mk/j1sNHyy3M1EON39g K2B2vOuY0fMI5teiHWtj795Se+URNvVSnUzIvsxIv/SjUrI1V4/EizW//GbPvUMn/OC/xt0X Dq3Km/ZN1e9RfOi31g9XWXcd+j9FiaU4I9FQi7moOBEASD5qClICAAA= X-MTR: 20000000000000000@CPGS Cc: sw0312.kim@samsung.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development <dri-devel.lists.freedesktop.org> List-Unsubscribe: <https://lists.freedesktop.org/mailman/options/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=unsubscribe> List-Archive: <https://lists.freedesktop.org/archives/dri-devel> List-Post: <mailto:dri-devel@lists.freedesktop.org> List-Help: <mailto:dri-devel-request@lists.freedesktop.org?subject=help> List-Subscribe: <https://lists.freedesktop.org/mailman/listinfo/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=subscribe> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" <dri-devel-bounces@lists.freedesktop.org> X-Virus-Scanned: ClamAV using ClamSMTP |
diff --git a/libkms/exynos.c b/libkms/exynos.c index 5de2e5a..0e97fb5 100644 --- a/libkms/exynos.c +++ b/libkms/exynos.c @@ -88,7 +88,8 @@ exynos_bo_create(struct kms_driver *kms, pitch = (pitch + 512 - 1) & ~(512 - 1); size = pitch * ((height + 4 - 1) & ~(4 - 1)); } else { - return -EINVAL; + ret = -EINVAL; + goto err_free; } memset(&arg, 0, sizeof(arg));
This patch fixes memory leak in error path of exynos_bo_create(). Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com> --- libkms/exynos.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)