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

[lvm-devel] [PATCH 5/9] Don't segfault in vg_release when vg->cmd is NULL.



Sun May  3 13:06:14 CEST 2009  Petr Rockai <me mornfall net>
  * Don't segfault in vg_release when vg->cmd is NULL.
diff -rN -u -p old-temp.31080/lib/metadata/metadata.c new-temp.31080/lib/metadata/metadata.c
--- old-temp.31080/lib/metadata/metadata.c	2009-05-03 13:29:33.682235890 +0200
+++ new-temp.31080/lib/metadata/metadata.c	2009-05-03 13:29:33.734236563 +0200
@@ -2091,7 +2091,7 @@ void vg_release(struct volume_group *vg)
 	if (!vg || !vg->vgmem)
 		return;
 
-	if (vg->vgmem == vg->cmd->mem)
+	if (vg->cmd && vg->vgmem == vg->cmd->mem)
 		log_error("Internal error: global memory pool used for VG %s",
 			  vg->name);
 


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