[PATCH 01/10] Check and handle error for virAsprintf() calls.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 src/interface/interface_backend_udev.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/interface/interface_backend_udev.c b/src/interface/interface_backend_udev.c
index cc20b98..3231b73 100644
--- a/src/interface/interface_backend_udev.c
+++ b/src/interface/interface_backend_udev.c
@@ -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;
         }
-- 
1.7.11.7

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]