udev: check and handle error for virAsprintf() calls

This commit is contained in:
John Ferlan 2013-01-03 14:16:13 -05:00 committed by Eric Blake
parent 35562e01b4
commit 62cc7b702b

View File

@ -654,9 +654,8 @@ udevIfaceGetIfaceDef(struct udev *udev, char *name)
ifacedef->data.bridge.stp = stp; ifacedef->data.bridge.stp = stp;
/* Members of the bridge */ /* Members of the bridge */
virAsprintf(&member_path, "%s/%s", if (virAsprintf(&member_path, "%s/%s",
udev_device_get_syspath(dev), "brif"); udev_device_get_syspath(dev), "brif") < 0) {
if (!member_path) {
virReportOOMError(); virReportOOMError();
goto cleanup; goto cleanup;
} }