mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-20 06:50:22 +03:00
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 (cherry picked from commit 784cca89c51fd13383064f248a6b375fb34e516f)
This commit is contained in:
parent
d23cf2c91b
commit
4f4e1cbf1f
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user