From patchwork Mon Apr 20 18:22:52 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Stone X-Patchwork-Id: 6243761 Return-Path: X-Original-To: patchwork-dri-devel@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 8E8139F32B for ; Mon, 20 Apr 2015 18:23:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C8B3A20421 for ; Mon, 20 Apr 2015 18:23:16 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 11FF52034F for ; Mon, 20 Apr 2015 18:23:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 635626E388; Mon, 20 Apr 2015 11:23:15 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [93.93.135.160]) by gabe.freedesktop.org (Postfix) with ESMTP id 7FE876E388 for ; Mon, 20 Apr 2015 11:23:13 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: daniels) with ESMTPSA id 53BEE600F83 From: Daniel Stone To: dri-devel@lists.freedesktop.org Subject: [PATCH 3/7] drm: Don't leak path blob property when updating Date: Mon, 20 Apr 2015 19:22:52 +0100 Message-Id: <1429554176-9865-4-git-send-email-daniels@collabora.com> X-Mailer: git-send-email 2.3.5 In-Reply-To: <1429554176-9865-1-git-send-email-daniels@collabora.com> References: <1429554176-9865-1-git-send-email-daniels@collabora.com> Cc: Dave Airlie X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 Previously, when updating the path blob property, we would leak the existing one. Make this symmetrical with the tile and EDID blob pointers. Signed-off-by: Daniel Stone Cc: Dave Airlie --- drivers/gpu/drm/drm_crtc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index a497c08..aae0d84 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c @@ -4302,6 +4302,9 @@ int drm_mode_connector_set_path_property(struct drm_connector *connector, size_t size = strlen(path) + 1; int ret; + if (connector->path_blob_ptr) + drm_property_destroy_blob(dev, connector->path_blob_ptr); + connector->path_blob_ptr = drm_property_create_blob(connector->dev, size, path); if (!connector->path_blob_ptr)