From patchwork Wed Sep 30 09:54:08 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudip Mukherjee X-Patchwork-Id: 7295111 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id DA9289F1D5 for ; Wed, 30 Sep 2015 10:06:42 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 13B4620662 for ; Wed, 30 Sep 2015 10:06:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 15C7F205FE for ; Wed, 30 Sep 2015 10:06:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755106AbbI3KGk (ORCPT ); Wed, 30 Sep 2015 06:06:40 -0400 Received: from mail-pa0-f41.google.com ([209.85.220.41]:34486 "EHLO mail-pa0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932885AbbI3JyU (ORCPT ); Wed, 30 Sep 2015 05:54:20 -0400 Received: by padhy16 with SMTP id hy16so36142848pad.1; Wed, 30 Sep 2015 02:54:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=sDeEKl52jimKtTpo7CC+1XMVt6g9abDqmayX7Zm5HJ4=; b=G3bc9hYj8RRFOfHBJWVTp1H/zBixxJfcOnzAzeoJ7CZ25ASvgwmnSKtR2c0Pw8R082 jA0CiVrJSBYUFwubXm9vyZp+FTnfO795M0TpTSJOCOtFqunH60Cnkixpd6KRnXdqx6vb jltL29c2PEWboI0gFSx3nMvWzNwJCvrX+qIsLH8gBA7vbqx/t5H5HEhErwDmzAy2zI2r btDKKEBoI4w7y7y0gafArRjW3AB3Y8nIzmTe59tG+Gfo5BaxQ33jDFHpigTk4BJfzXMx 7Rfbt0QUClrokTW3LgRlC5bfp+wjSfUK/AaT1emCYD6HWH5pDEsueCiSpogIYzaIe7U4 eZWQ== X-Received: by 10.68.171.37 with SMTP id ar5mr3976964pbc.39.1443606859897; Wed, 30 Sep 2015 02:54:19 -0700 (PDT) Received: from localhost.localdomain ([49.206.244.224]) by smtp.gmail.com with ESMTPSA id bn1sm457132pad.17.2015.09.30.02.54.17 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 30 Sep 2015 02:54:19 -0700 (PDT) From: Sudip Mukherjee To: Jean-Christophe Plagniol-Villard , Tomi Valkeinen Cc: linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org, Sudip Mukherjee Subject: [PATCH] video: of: fix memory leak Date: Wed, 30 Sep 2015 15:24:08 +0530 Message-Id: <1443606848-31510-1-git-send-email-sudipm.mukherjee@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP If of_parse_display_timing() fails we are printing an error message and jumping to the error path but we missed freeing "dt". Signed-off-by: Sudip Mukherjee --- drivers/video/of_display_timing.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/video/of_display_timing.c b/drivers/video/of_display_timing.c index 32d8275..8a1076b 100644 --- a/drivers/video/of_display_timing.c +++ b/drivers/video/of_display_timing.c @@ -210,6 +210,7 @@ struct display_timings *of_get_display_timings(struct device_node *np) */ pr_err("%s: error in timing %d\n", of_node_full_name(np), disp->num_timings + 1); + kfree(dt); goto timingfail; }