43fe83
From d49b62fca1ec33a7feed94ce6f44995164d83872 Mon Sep 17 00:00:00 2001
43fe83
Message-Id: <d49b62fca1ec33a7feed94ce6f44995164d83872.1377873641.git.jdenemar@redhat.com>
43fe83
From: =?UTF-8?q?J=C3=A1n=20Tomko?= <jtomko@redhat.com>
43fe83
Date: Mon, 26 Aug 2013 16:01:43 +0200
43fe83
Subject: [PATCH] Don't free NULL network in cmdNetworkUpdate
43fe83
43fe83
If the network has not been found, virNetworkFree(NULL)
43fe83
was called, resulting in an extra error:
43fe83
error: invalid network pointer in virNetworkFree
43fe83
43fe83
https://bugzilla.redhat.com/show_bug.cgi?id=1001094
43fe83
43fe83
(cherry picked from commit 784cca89c51fd13383064f248a6b375fb34e516f)
43fe83
---
43fe83
 tools/virsh-network.c | 2 +-
43fe83
 1 file changed, 1 insertion(+), 1 deletion(-)
43fe83
43fe83
diff --git a/tools/virsh-network.c b/tools/virsh-network.c
43fe83
index e1baf0b..06bf483 100644
43fe83
--- a/tools/virsh-network.c
43fe83
+++ b/tools/virsh-network.c
43fe83
@@ -918,7 +918,7 @@ cmdNetworkUpdate(vshControl *ctl, const vshCmd *cmd)
43fe83
     const char *affected;
43fe83
 
43fe83
     if (!(network = vshCommandOptNetwork(ctl, cmd, NULL)))
43fe83
-        goto cleanup;
43fe83
+        return false;
43fe83
 
43fe83
     if (vshCommandOptStringReq(ctl, cmd, "command", &commandStr) < 0)
43fe83
         goto cleanup;
43fe83
-- 
43fe83
1.8.3.2
43fe83