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:
parent
42e23dbf6c
commit
a720420466
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user