diff mbox

btrfs: fix dip leak

Message ID AANLkTikDN-v4C4rt-uTFQ35uoaoJ_9LRHSmAQUN4+uVD@mail.gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Daniel J Blueman March 9, 2011, 4:46 p.m. UTC
None
diff mbox

Patch

diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 0efdb65..53f4c8e 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -6056,6 +6056,7 @@  static void btrfs_submit_direct(int rw, struct
bio *bio, struct inode *inode,
 	if (!skip_sum) {
 		dip->csums = kmalloc(sizeof(u32) * bio->bi_vcnt, GFP_NOFS);
 		if (!dip->csums) {
+			kfree(dip);
 			ret = -ENOMEM;
 			goto free_ordered;