mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
cov: validate return from display_lvname
Ensure strdup will not get NULL.
This commit is contained in:
parent
4f1d89d37f
commit
4abdc5981a
@ -2050,7 +2050,7 @@ static int _lvconvert_snapshot(struct cmd_context *cmd,
|
|||||||
uint32_t chunk_size;
|
uint32_t chunk_size;
|
||||||
int zero;
|
int zero;
|
||||||
|
|
||||||
if (!(snap_name = dm_pool_strdup(lv->vg->vgmem, display_lvname(lv))))
|
if (!(snap_name = dm_pool_strdup(lv->vg->vgmem, (display_lvname(lv) ? : ""))))
|
||||||
return_0;
|
return_0;
|
||||||
|
|
||||||
if (strcmp(lv->name, origin_name) == 0) {
|
if (strcmp(lv->name, origin_name) == 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user