search for: d6f81f8

Displaying 2 results from an estimated 2 matches for "d6f81f8".

Did you mean: 3d6f818
2013 Jun 25
3
[PATCH] btrfs-progs: avoid memory leak in btrfs_close_devices
...ged by fs_devices * The name field for each struct btrfs_device * The above items for seed_devices Signed-off-by: Wang Sheng-Hui <shhuiw@gmail.com> --- volumes.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/volumes.c b/volumes.c index d6f81f8..257b740 100644 --- a/volumes.c +++ b/volumes.c @@ -153,6 +153,16 @@ static int device_list_add(const char *path, return 0; } +static void btrfs_close_device(struct btrfs_device *device) +{ + close(device->fd); + device->fd = -1; + device->writeable = 0; + if (device->name) + kfr...
2013 Jun 08
0
[PATCH] Btrfs-progs: elaborate error handling of mkfs
...,7 +1467,7 @@ int main(int ac, char **av) ret = make_root_dir(root, mixed); if (ret) { - fprintf(stderr, "failed to setup the root directory\n"); + fprintf(stderr, "failed to setup the root directory %d\n", ret); exit(1); } diff --git a/volumes.c b/volumes.c index d6f81f8..8285240 100644 --- a/volumes.c +++ b/volumes.c @@ -842,11 +842,13 @@ again: info->chunk_root->root_key.objectid, BTRFS_FIRST_CHUNK_TREE_OBJECTID, key.offset, calc_size, &dev_offset); - BUG_ON(ret); + if (ret) + goto out; device->bytes_used += calc_s...