From a720420466463378aa08afa64dba793b9f3ef54d Mon Sep 17 00:00:00 2001 From: Petr Rockai Date: Wed, 20 Jul 2011 18:23:33 +0000 Subject: [PATCH] Fix two small (but eventually unbounded) leaks in daemon-server.c. --- daemons/common/daemon-server.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/daemons/common/daemon-server.c b/daemons/common/daemon-server.c index c1668118a..13cdaccb2 100644 --- a/daemons/common/daemon-server.c +++ b/daemons/common/daemon-server.c @@ -253,6 +253,7 @@ void *client_thread(void *baton) if (!res.buffer) { write_config_node(res.cft->root, buffer_line, &res); buffer_rewrite(&res.buffer, "%s\n\n", NULL); + destroy_config_tree(res.cft); } write_buffer(b->client.socket_fd, res.buffer, strlen(res.buffer)); @@ -261,6 +262,7 @@ void *client_thread(void *baton) } fail: /* TODO what should we really do here? */ + free(baton); return NULL; }