]> sourceware.org Git - lvm2.git/commitdiff
Free up allocated memory before exiting, in lvmetad.
authorPetr Rockai <prokai@redhat.com>
Wed, 20 Jul 2011 18:24:49 +0000 (18:24 +0000)
committerPetr Rockai <prokai@redhat.com>
Wed, 20 Jul 2011 18:24:49 +0000 (18:24 +0000)
daemons/lvmetad/lvmetad-core.c

index 3dccbaed92cd5761cf87c73913400c90414e1c32..5940b3f5c7d7fa9dc235c75402b832f896c23a51 100644 (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;
 }
 
This page took 0.032745 seconds and 5 git commands to generate.