1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-10 16:58:47 +03:00

Free up allocated memory before exiting, in lvmetad.

This commit is contained in:
Petr Rockai 2011-07-20 18:24:49 +00:00
parent a720420466
commit 652e0757c9

View File

@ -274,6 +274,13 @@ static int init(daemon_state *s)
static int fini(daemon_state *s)
{
lvmetad_state *ls = s->private;
struct dm_hash_node *n = dm_hash_get_first(ls->vgs);
while (n) {
destroy_config_tree(dm_hash_get_data(ls->vgs, n));
n = dm_hash_get_next(ls->vgs, n);
}
dm_hash_destroy(ls->pvs);
dm_hash_destroy(ls->vgs);
return 1;
}