diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2012-02-27 10:19:00 +0000 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2012-02-27 10:19:00 +0000 |
commit | d2e33bed9435410f1cf9510f511a69212d2f299e (patch) | |
tree | 036ce18e96a2fe4f8ec2cc94aeca3e50d40394b4 /daemons | |
parent | 25555737bd6accb0ed62c42a1c784576af7e2c25 (diff) | |
download | lvm2-d2e33bed9435410f1cf9510f511a69212d2f299e.tar.gz lvm2-d2e33bed9435410f1cf9510f511a69212d2f299e.tar.xz lvm2-d2e33bed9435410f1cf9510f511a69212d2f299e.zip |
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.
Diffstat (limited to 'daemons')
-rw-r--r-- | daemons/lvmetad/lvmetad-core.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/daemons/lvmetad/lvmetad-core.c b/daemons/lvmetad/lvmetad-core.c index 07e9a419..f53478b6 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); |