Re: [PATCHv2 3/4] net-dhcp-leases: Private implementation inside network driver

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

 



On 13/09/13 17:10, Nehal J Wani wrote:
Just realized that obj should be non-null. Small diff to fix this:

diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c
index 2cdea56..3e93893 100644
--- a/src/network/bridge_driver.c
+++ b/src/network/bridge_driver.c
@@ -3020,7 +3020,8 @@ networkGetDHCPLeases(virNetworkPtr network,
     virCheckFlags(0, -1);
-    obj = networkObjFromNetwork(network);
+    if (!(obj = networkObjFromNetwork(network)))
+        return rv;
     if (virNetworkGetDHCPLeasesEnsureACL(network->conn, obj->def) < 0)
         goto cleanup;
@@ -3044,7 +3045,8 @@ networkGetDHCPLeasesForMAC(virNetworkPtr network,
     virCheckFlags(0, -1);
-    obj = networkObjFromNetwork(network);
+    if (!(obj = networkObjFromNetwork(network)))
+        return rv;
if (virNetworkGetDHCPLeasesForMACEnsureACL(network->conn, obj->def) < 0)
         goto cleanup;


Don't have to paste the diff in mail context, and attach the diff meanwhile.

--
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]