提交 0da9a8a8 编写于 作者: J John Ferlan

parallels: Resolve Coverity USE_AFTER_FREE

Coverity complains that calling virNetworkDefFree(def), then jumping
to the cleanup: label which calls virNetworkDefFree(def) could result
in a double_free.  Just remove the call from the if statement.
上级 a6a210b8
......@@ -226,10 +226,8 @@ parallelsLoadNetwork(parallelsConnPtr privconn, virJSONValuePtr jobj)
goto cleanup;
}
if (!(net = virNetworkAssignDef(&privconn->networks, def, false))) {
virNetworkDefFree(def);
if (!(net = virNetworkAssignDef(&privconn->networks, def, false)))
goto cleanup;
}
net->active = 1;
net->autostart = 1;
virNetworkObjUnlock(net);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册