Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762662AbYBSWOa (ORCPT ); Tue, 19 Feb 2008 17:14:30 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755639AbYBSWNn (ORCPT ); Tue, 19 Feb 2008 17:13:43 -0500 Received: from smtp3-g19.free.fr ([212.27.42.29]:54069 "EHLO smtp3-g19.free.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754919AbYBSWNk (ORCPT ); Tue, 19 Feb 2008 17:13:40 -0500 From: Jim Meyering To: linux-kernel@vger.kernel.org Cc: Andrew Morton , Markus Armbruster , Jim Meyering Subject: [PATCH] hfs: handle match_strdup failure Date: Tue, 19 Feb 2008 23:13:37 +0100 Message-Id: <1203459219-14719-5-git-send-email-jim@meyering.net> X-Mailer: git-send-email 1.5.4.2.134.g82883 In-Reply-To: <1203459219-14719-4-git-send-email-jim@meyering.net> References: <1203459219-14719-1-git-send-email-jim@meyering.net> <1203459219-14719-2-git-send-email-jim@meyering.net> <1203459219-14719-3-git-send-email-jim@meyering.net> <1203459219-14719-4-git-send-email-jim@meyering.net> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1233 Lines: 39 * fs/hfs/super.c (parse_options): Handle match_strdup failure, twice. Signed-off-by: Jim Meyering --- fs/hfs/super.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/fs/hfs/super.c b/fs/hfs/super.c index 32de44e..8cf6797 100644 --- a/fs/hfs/super.c +++ b/fs/hfs/super.c @@ -297,7 +297,8 @@ static int parse_options(char *options, struct hfs_sb_info *hsb) return 0; } p = match_strdup(&args[0]); - hsb->nls_disk = load_nls(p); + if (p) + hsb->nls_disk = load_nls(p); if (!hsb->nls_disk) { printk(KERN_ERR "hfs: unable to load codepage \"%s\"\n", p); kfree(p); @@ -311,7 +312,8 @@ static int parse_options(char *options, struct hfs_sb_info *hsb) return 0; } p = match_strdup(&args[0]); - hsb->nls_io = load_nls(p); + if (p) + hsb->nls_io = load_nls(p); if (!hsb->nls_io) { printk(KERN_ERR "hfs: unable to load iocharset \"%s\"\n", p); kfree(p); -- 1.5.4.2.134.g82883 -- 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/