From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH 2/2] drm/i915/sdvo: kfree the intel_sdvo_connector, not drm_connector, on destroy Date: Thu, 22 Nov 2012 14:10:31 +0100 Message-ID: <20121122131030.GD6536@phenom.ffwll.local> References: <648e4ccc5905fd977c69a8dbab0074b05bd56596.1352737835.git.jani.nikula@intel.com> <196dd61309e46034f7c0c6ce5c920c0dea7f9531.1352737835.git.jani.nikula@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ee0-f49.google.com (mail-ee0-f49.google.com [74.125.83.49]) by gabe.freedesktop.org (Postfix) with ESMTP id 519EDE5EC3 for ; Thu, 22 Nov 2012 05:09:10 -0800 (PST) Received: by mail-ee0-f49.google.com with SMTP id c4so2927236eek.36 for ; Thu, 22 Nov 2012 05:09:09 -0800 (PST) Content-Disposition: inline In-Reply-To: <196dd61309e46034f7c0c6ce5c920c0dea7f9531.1352737835.git.jani.nikula@intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Jani Nikula Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Mon, Nov 12, 2012 at 06:31:36PM +0200, Jani Nikula wrote: > Since the base fields in both struct intel_connector and struct > intel_sdvo_connector are at the beginning of the enclosing struct, the > pointers are essentially the same, but there is no requirement or guarantee > that this is always the case. Kfree the enclosing intel_sdvo_connector > pointer that was originally allocated, not the enclosed drm_connector, in > case someone ever rearranges the structs. > > Signed-off-by: Jani Nikula Queued for -next, thanks for the patch. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch