1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +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) { if (!res.buffer) {
write_config_node(res.cft->root, buffer_line, &res); write_config_node(res.cft->root, buffer_line, &res);
buffer_rewrite(&res.buffer, "%s\n\n", NULL); buffer_rewrite(&res.buffer, "%s\n\n", NULL);
destroy_config_tree(res.cft);
} }
write_buffer(b->client.socket_fd, res.buffer, strlen(res.buffer)); write_buffer(b->client.socket_fd, res.buffer, strlen(res.buffer));
@ -261,6 +262,7 @@ void *client_thread(void *baton)
} }
fail: fail:
/* TODO what should we really do here? */ /* TODO what should we really do here? */
free(baton);
return NULL; return NULL;
} }