search for: 5c4be6cf7

Displaying 1 result from an estimated 1 matches for "5c4be6cf7".

2018 Aug 06
1
[PATCH] btrfs_balance_status: delay allocation of 'ret'
Allocate 'ret' as late as possible, so there is no risk that early returns will leak it. --- daemon/btrfs.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/daemon/btrfs.c b/daemon/btrfs.c index 26757d4fb..5c4be6cf7 100644 --- a/daemon/btrfs.c +++ b/daemon/btrfs.c @@ -1683,12 +1683,6 @@ do_btrfs_balance_status (const char *path) nlines = guestfs_int_count_strings (lines); - ret = calloc (1, sizeof *ret); - if (ret == NULL) { - reply_with_perror ("calloc"); - return NULL; - } - /* O...