Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750810AbWCYEbo (ORCPT ); Fri, 24 Mar 2006 23:31:44 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1750844AbWCYE2A (ORCPT ); Fri, 24 Mar 2006 23:28:00 -0500 Received: from dsl093-040-174.pdx1.dsl.speakeasy.net ([66.93.40.174]:46524 "EHLO aria.kroah.org") by vger.kernel.org with ESMTP id S1750843AbWCYE12 (ORCPT ); Fri, 24 Mar 2006 23:27:28 -0500 Date: Fri, 24 Mar 2006 20:27:05 -0800 From: Greg KH To: linux-kernel@vger.kernel.org, stable@kernel.org Cc: Justin Forbes , Zwane Mwaikambo , "Theodore Ts'o" , Randy Dunlap , Dave Jones , Chuck Wolber , torvalds@osdl.org, akpm@osdl.org, alan@lxorguk.ukuu.org.uk, Maneesh Soni , Oliver Neukum , Greg Kroah-Hartman Subject: [patch 09/20] sysfs: fix a kobject leak in sysfs_add_link on the error path Message-ID: <20060325042705.GJ21260@kroah.com> References: <20060325041355.180237000@quad.kroah.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline; filename="driver-0023-sysfs-fix-a-kobject-leak-in-sysfs_add_link-on-the-error-path.patch" In-Reply-To: <20060325042556.GA21260@kroah.com> User-Agent: Mutt/1.5.11 Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 844 Lines: 32 -stable review patch. If anyone has any objections, please let us know. ------------------ As pointed out by Oliver Neukum. Cc: Maneesh Soni Cc: Oliver Neukum Signed-off-by: Greg Kroah-Hartman --- fs/sysfs/symlink.c | 1 + 1 file changed, 1 insertion(+) b3229087c5e08589cea4f5040dab56f7dc11332a --- linux-2.6.16.orig/fs/sysfs/symlink.c +++ linux-2.6.16/fs/sysfs/symlink.c @@ -66,6 +66,7 @@ static int sysfs_add_link(struct dentry if (!error) return 0; + kobject_put(target); kfree(sl->link_name); exit2: kfree(sl); -- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/