mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
cov: memleak on error path
This commit is contained in:
parent
241c63f7a7
commit
a6075fe2f2
@ -1713,8 +1713,10 @@ static int _setup_devices_list(struct cmd_context *cmd)
|
||||
if (!(du = zalloc(sizeof(struct dev_use))))
|
||||
return_0;
|
||||
|
||||
if (!(du->devname = strdup(strl->str)))
|
||||
if (!(du->devname = strdup(strl->str))) {
|
||||
free(du);
|
||||
return_0;
|
||||
}
|
||||
|
||||
dm_list_add(&cmd->use_devices, &du->list);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user