All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chuck Ebbert <cebbert@redhat.com>
To: Christoph Hellwig <hch@tuxera.com>
Cc: linux-kernel@vger.kernel.org
Subject: [Patch 1/4] hfsplus: Don't leak buffer on error
Date: Tue, 1 Feb 2011 16:41:55 -0500	[thread overview]
Message-ID: <20110201164155.1a4c9ff6@katamari> (raw)
In-Reply-To: <20110201162802.2dd07201@katamari>

hfsplus: Don't leak buffer on error

Signed-Off-By: Chuck Ebbert <cebbert@redhat.com>

--- vanilla-2.6.38-rc2-git9.orig/fs/hfsplus/part_tbl.c
+++ vanilla-2.6.38-rc2-git9/fs/hfsplus/part_tbl.c
@@ -134,7 +134,7 @@ int hfs_part_find(struct super_block *sb
 	res = hfsplus_submit_bio(sb->s_bdev, *part_start + HFS_PMAP_BLK,
 				 data, READ);
 	if (res)
-		return res;
+		goto out;
 
 	switch (be16_to_cpu(*((__be16 *)data))) {
 	case HFS_OLD_PMAP_MAGIC:
@@ -147,7 +147,7 @@ int hfs_part_find(struct super_block *sb
 		res = -ENOENT;
 		break;
 	}
-
+out:
 	kfree(data);
 	return res;
 }

  parent reply	other threads:[~2011-02-01 22:02 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-01 21:28 [Patch 0/4] Fix error handling in hfsplus mount failure paths Chuck Ebbert
2011-02-01 21:41 ` [Patch 2/4] hfsplus: Skip cleanup on early mount failures Chuck Ebbert
2011-02-01 21:41 ` Chuck Ebbert [this message]
2011-02-01 22:08   ` [Patch 1/4] hfsplus: Don't leak buffer on error Christoph Hellwig
2011-02-01 21:45 ` [Patch 3/4] hfsplus: Clear volume header pointers on failure Chuck Ebbert
2011-02-01 22:13   ` Christoph Hellwig
2011-02-01 21:56 ` [Patch 4/4] hfsplus: Check for NULL volume header in put_super() Chuck Ebbert
2011-02-01 22:07 ` [Patch 0/4] Fix error handling in hfsplus mount failure paths Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110201164155.1a4c9ff6@katamari \
    --to=cebbert@redhat.com \
    --cc=hch@tuxera.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.