1
0
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:
Zdenek Kabelac 2024-03-25 16:59:27 +01:00
parent 4f1d89d37f
commit 4abdc5981a

View File

@ -2050,7 +2050,7 @@ static int _lvconvert_snapshot(struct cmd_context *cmd,
uint32_t chunk_size;
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;
if (strcmp(lv->name, origin_name) == 0) {