1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

Fix two small (but eventually unbounded) leaks in daemon-server.c.

This commit is contained in:
Petr Rockai 2011-07-20 18:23:33 +00:00
parent 42e23dbf6c
commit a720420466

View File

@ -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;
}