Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751852AbdITH0P (ORCPT ); Wed, 20 Sep 2017 03:26:15 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:33099 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751790AbdITH0M (ORCPT ); Wed, 20 Sep 2017 03:26:12 -0400 X-Google-Smtp-Source: AOwi7QCEMJVx/XiQT1a0uLwXs/IlfPjKSUSQHE9Y+tXk5+JwptWj2UZASbRCULwdNVOrnxw5L6TDFQ== From: Arvind Yadav To: thierry.reding@gmail.com, airlied@linux.ie, jonathanh@nvidia.com, daniel.vetter@intel.com, jani.nikula@linux.intel.com, seanpaul@chromium.org Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] drm: Release memory obtained by kasprintf Date: Wed, 20 Sep 2017 12:55:08 +0530 Message-Id: <1505892308-6843-3-git-send-email-arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1505892308-6843-1-git-send-email-arvind.yadav.cs@gmail.com> References: <1505892308-6843-1-git-send-email-arvind.yadav.cs@gmail.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 606 Lines: 21 Free memory region, if drm_crtc_init_with_planes is not successful. Signed-off-by: Arvind Yadav --- drivers/gpu/drm/drm_crtc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index 5af25ce..cd4e628 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -328,6 +328,7 @@ int drm_crtc_init_with_planes(struct drm_device *dev, struct drm_crtc *crtc, ret = drm_crtc_crc_init(crtc); if (ret) { drm_mode_object_unregister(dev, &crtc->base); + kfree(crtc->name); return ret; } -- 1.9.1