This is the mail archive of the
lvm2-cvs@sourceware.org
mailing list for the LVM2 project.
LVM2/daemons/lvmetad lvmetad-core.c
- From: mornfall at sourceware dot org
- To: lvm-devel at redhat dot com, lvm2-cvs at sourceware dot org
- Date: 20 Jul 2011 18:24:50 -0000
- Subject: LVM2/daemons/lvmetad lvmetad-core.c
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: mornfall@sourceware.org 2011-07-20 18:24:49
Modified files:
daemons/lvmetad: lvmetad-core.c
Log message:
Free up allocated memory before exiting, in lvmetad.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/lvmetad/lvmetad-core.c.diff?cvsroot=lvm2&r1=1.12&r2=1.13
--- LVM2/daemons/lvmetad/lvmetad-core.c 2011/07/20 16:49:21 1.12
+++ LVM2/daemons/lvmetad/lvmetad-core.c 2011/07/20 18:24:49 1.13
@@ -274,6 +274,13 @@
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;
}