[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[lvm-devel] 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;
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]