From d2e33bed9435410f1cf9510f511a69212d2f299e Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Mon, 27 Feb 2012 10:19:00 +0000 Subject: [PATCH] Add assert for oldname Code cannot proceed if oldname would be NULL. Since lvmetad currently doesn't use logging mechanism of lvm to report internal errors - stay with current code style of lvmetad which uses plain asserts for cases like this. --- daemons/lvmetad/lvmetad-core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/daemons/lvmetad/lvmetad-core.c b/daemons/lvmetad/lvmetad-core.c index 07e9a4197..f53478b64 100644 --- a/daemons/lvmetad/lvmetad-core.c +++ b/daemons/lvmetad/lvmetad-core.c @@ -595,6 +595,7 @@ static int remove_metadata(lvmetad_state *s, const char *vgid, int update_pvids) if (!old) return 0; + assert(oldname); if (update_pvids) update_pvid_to_vgid(s, old, "#orphan", 0); -- 2.43.5