These two variables (chunk_root and dev_root) that were not
tested for failed allocation weren't freed-upon-failure either:

changeset:   709:c40da2ab8c03
tag:         tip
user:        Jim Meyering <[EMAIL PROTECTED]>
date:        Tue Sep 09 16:35:47 2008 +0200
files:       disk-io.c
description:
disk-io.c (open_ctree): avoid leaks


diff --git a/disk-io.c b/disk-io.c
--- a/disk-io.c
+++ b/disk-io.c
@@ -1655,6 +1655,8 @@
        bdi_destroy(&fs_info->bdi);
 #endif
        kfree(fs_info);
+       kfree(chunk_root);
+       kfree(dev_root);
        return ERR_PTR(err);
 }
 

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to