Don't free NULL network in cmdNetworkUpdate

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
This commit is contained in:
Ján Tomko 2013-08-26 12:51:08 +02:00
parent 8a38db0dd9
commit 784cca89c5

View 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;