Displaying 2 results from an estimated 2 matches for "3ce54fa".
Did you mean:
3ce54fa37
2016 Jul 07
0
[PATCH 2/2] daemon: fix cleanup of stringsbuf usages
...);
yajl_val n;
size_t i, len;
@@ -194,7 +192,7 @@ json_value_to_string_list (yajl_val node)
if (end_stringsbuf (&strs) == -1)
return NULL;
- return strs.argv;
+ return take_stringsbuf (&strs);
}
static char **
diff --git a/daemon/link.c b/daemon/link.c
index 43c55f8..3ce54fa 100644
--- a/daemon/link.c
+++ b/daemon/link.c
@@ -53,7 +53,7 @@ do_internal_readlinklist (const char *path, char *const *names)
{
int fd_cwd;
size_t i;
- DECLARE_STRINGSBUF (ret);
+ CLEANUP_FREE_STRINGSBUF DECLARE_STRINGSBUF (ret);
CHROOT_IN;
fd_cwd = open (path, O_RDONLY|O_DIRECT...
2016 Jul 07
2
[PATCH 1/2] daemon: free the string on stringsbuf add failure
If add_string_nodup fails free the passed string instead of leaking it,
as that string would have been owned by the stringbuf.
Adapt few places to this behaviour.
---
daemon/btrfs.c | 4 +---
daemon/devsparts.c | 8 ++++----
daemon/guestfsd.c | 1 +
3 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/daemon/btrfs.c b/daemon/btrfs.c
index 9b52aa8..d70565a 100644
---