Displaying 2 results from an estimated 2 matches for "d363ada6d".
2017 Nov 03
1
[PATCH] daemon: btrfs: remove dead check
In btrfs_subvolume_show, an extra check on 'key' is used in a place
where this variable is already checked to be non-null.
---
daemon/btrfs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/daemon/btrfs.c b/daemon/btrfs.c
index f11902b21..d363ada6d 100644
--- a/daemon/btrfs.c
+++ b/daemon/btrfs.c
@@ -990,7 +990,7 @@ do_btrfs_subvolume_show (const char *subvolume)
return NULL;
}
} else {
- if (add_string (&ret, key ? key : "") == -1)
+ if (add_string (&ret, key) == -1)
return NULL;...
2017 Nov 03
1
[PATCH] daemon: btrfs: fix bad handling of a couple of errors
...urn null directly, instead of jumping
to 'error'
- if the strdup() for 'btrfsbalance_status' fails, then the directly
return would leak 'ret'
---
daemon/btrfs.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/daemon/btrfs.c b/daemon/btrfs.c
index d363ada6d..26757d4fb 100644
--- a/daemon/btrfs.c
+++ b/daemon/btrfs.c
@@ -1686,7 +1686,7 @@ do_btrfs_balance_status (const char *path)
ret = calloc (1, sizeof *ret);
if (ret == NULL) {
reply_with_perror ("calloc");
- goto error;
+ return NULL;
}
/* Output of `btrfs balance...