Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261172AbVDYU25 (ORCPT ); Mon, 25 Apr 2005 16:28:57 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261165AbVDYU2x (ORCPT ); Mon, 25 Apr 2005 16:28:53 -0400 Received: from mail.dif.dk ([193.138.115.101]:11670 "EHLO saerimmer.dif.dk") by vger.kernel.org with ESMTP id S261159AbVDYU0D (ORCPT ); Mon, 25 Apr 2005 16:26:03 -0400 Date: Mon, 25 Apr 2005 22:29:21 +0200 (CEST) From: Jesper Juhl To: Colin Leroy Cc: Roman Zippel , "linux-kernel@vger.kernel.org" , Andrew Morton Subject: Re: [PATCH] hfsplus: don't oops on bad FS In-Reply-To: <20050425220345.6b2ed6d5@jack.colino.net> Message-ID: References: <20050425211915.126ddab5@jack.colino.net> <20050425220345.6b2ed6d5@jack.colino.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1021 Lines: 34 On Mon, 25 Apr 2005, Colin Leroy wrote: > On 25 Apr 2005 at 21h04, Roman Zippel wrote: > > Hi, > > > Actually it looks like we are always leaking it, so actually > > hfsplus_put_super() needs fixing, could you add the check and kfree > > there and do the same fix for hfs? > > Mmh, right. Here's an updated version that fixes it too. > > Signed-off-by: Colin Leroy > --- a/fs/hfsplus/super.c 2005-04-25 21:56:56.000000000 +0200 > +++ b/fs/hfsplus/super.c 2005-04-25 21:58:39.000000000 +0200 > @@ -226,6 +226,9 @@ > brelse(HFSPLUS_SB(sb).s_vhbh); > if (HFSPLUS_SB(sb).nls) > unload_nls(HFSPLUS_SB(sb).nls); > + > + kfree((struct hfsplus_sb_info *)sb->s_fs_info); kfree() takes a void * argument, that cast is not needed. -- Jesper Juhl - 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/