mirror of
git://sourceware.org/git/lvm2.git
synced 2025-03-10 16:58:47 +03:00
lvmetad: fix memleak on error path
Release allocated buffer on error path.
This commit is contained in:
parent
8edc0e450d
commit
3685701529
@ -400,8 +400,10 @@ static void *client_thread(void *baton)
|
||||
|
||||
if (!res.buffer) {
|
||||
dm_config_write_node(res.cft->root, buffer_line, &res);
|
||||
if (!buffer_rewrite(&res.buffer, "%s\n\n", NULL))
|
||||
if (!buffer_rewrite(&res.buffer, "%s\n\n", NULL)) {
|
||||
dm_free(req.buffer);
|
||||
goto fail;
|
||||
}
|
||||
dm_config_destroy(res.cft);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user