mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00:00
udev: check and handle error for virAsprintf() calls
This commit is contained in:
parent
35562e01b4
commit
62cc7b702b
@ -654,9 +654,8 @@ udevIfaceGetIfaceDef(struct udev *udev, char *name)
|
||||
ifacedef->data.bridge.stp = stp;
|
||||
|
||||
/* Members of the bridge */
|
||||
virAsprintf(&member_path, "%s/%s",
|
||||
udev_device_get_syspath(dev), "brif");
|
||||
if (!member_path) {
|
||||
if (virAsprintf(&member_path, "%s/%s",
|
||||
udev_device_get_syspath(dev), "brif") < 0) {
|
||||
virReportOOMError();
|
||||
goto cleanup;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user