]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Don't free NULL network in cmdNetworkUpdate
authorJán Tomko <jtomko@redhat.com>
Mon, 26 Aug 2013 10:51:08 +0000 (12:51 +0200)
committerJán Tomko <jtomko@redhat.com>
Mon, 26 Aug 2013 13:51:15 +0000 (15:51 +0200)
If the network has not been found, virNetworkFree(NULL)
was called, resulting in an extra error:
error: invalid network pointer in virNetworkFree

https://bugzilla.redhat.com/show_bug.cgi?id=1001094

tools/virsh-network.c

index e1baf0b332b82a89fa298c4897340e43af300775..06bf483926136e73a684caf8afe420a574bdef56 100644 (file)
@@ -918,7 +918,7 @@ cmdNetworkUpdate(vshControl *ctl, const vshCmd *cmd)
     const char *affected;
 
     if (!(network = vshCommandOptNetwork(ctl, cmd, NULL)))
-        goto cleanup;
+        return false;
 
     if (vshCommandOptStringReq(ctl, cmd, "command", &commandStr) < 0)
         goto cleanup;