Make sure to check the return value of end_stringsbuf everywhere, as
that would generate invalid string lists.
---
daemon/btrfs.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/daemon/btrfs.c b/daemon/btrfs.c
index 711f7eb..d18f518 100644
--- a/daemon/btrfs.c
+++ b/daemon/btrfs.c
@@ -2280,7 +2280,8 @@ do_btrfs_filesystem_show (const char *device)
}
}
- end_stringsbuf (&ret);
+ if (end_stringsbuf (&ret) == -1)
+ return NULL;
return take_stringsbuf (&ret);
}
--
2.9.3