mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 19:32:19 +00:00
lxc: Resolve Coverity FORWARD_NULL
If we jump to cleanup before allocating 'result', then the call to virBlkioDeviceArrayClear() could dereference result Signed-off-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
parent
bf15f10abe
commit
0311be9435
@ -2222,8 +2222,10 @@ lxcDomainParseBlkioDeviceStr(char *blkioDeviceStr, const char *type,
|
||||
_("unable to parse blkio device '%s' '%s'"),
|
||||
type, blkioDeviceStr);
|
||||
cleanup:
|
||||
virBlkioDeviceArrayClear(result, ndevices);
|
||||
VIR_FREE(result);
|
||||
if (result) {
|
||||
virBlkioDeviceArrayClear(result, ndevices);
|
||||
VIR_FREE(result);
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user