mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 21:55:25 +00:00
util: Use glib memory functions in virDevMapperGetTargetsImpl
Signed-off-by: Tim Wiederhake <twiederh@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com> Signed-off-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
85e4418502
commit
e5c2b25075
@ -260,9 +260,7 @@ virDevMapperGetTargetsImpl(int controlFD,
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (VIR_ALLOC_N_QUIET(devPaths, deps->count + 1) < 0)
|
||||
return -1;
|
||||
|
||||
devPaths = g_new0(char *, deps->count + 1);
|
||||
for (i = 0; i < deps->count; i++) {
|
||||
devPaths[i] = g_strdup_printf("/dev/block/%u:%u",
|
||||
major(deps->dev[i]),
|
||||
|
Loading…
Reference in New Issue
Block a user