disk-io.c (open_ctree): avoid leaks

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <meyering@xxxxxxxxxx>
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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux