On 05/21/2013 10:18 AM, Michal Privoznik wrote: > In order to learn libvirt multiqueue several things must be done: [...snip...] > diff --git a/src/uml/uml_conf.c b/src/uml/uml_conf.c > index 52b705c..3fda7e4 100644 > --- a/src/uml/uml_conf.c > +++ b/src/uml/uml_conf.c > @@ -109,6 +109,7 @@ umlConnectTapDevice(virConnectPtr conn, > const char *bridge) > { > bool template_ifname = false; > + int tapfd; > > if (!net->ifname || > STRPREFIX(net->ifname, VIR_NET_GENERATED_PREFIX) || > @@ -121,7 +122,7 @@ umlConnectTapDevice(virConnectPtr conn, > } > > if (virNetDevTapCreateInBridgePort(bridge, &net->ifname, &net->mac, > - vm->uuid, NULL, > + vm->uuid, &tapfd, 1, > > virDomainNetGetActualVirtPortProfile(net), > virDomainNetGetActualVlan(net), > VIR_NETDEV_TAP_CREATE_IFUP | > @@ -139,9 +140,11 @@ umlConnectTapDevice(virConnectPtr conn, > } > } > > + VIR_FORCE_CLOSE(tapfd); > return 0; > > error: > + VIR_FORCE_CLOSE(tapfd);
Coverity complains: 146 error: (6) Event uninit_use_in_call: Using uninitialized value "tapfd" when calling "virFileClose(int *, virFileCloseFlags)". [details] Also see events: [var_decl] 147 VIR_FORCE_CLOSE(tapfd); Because tapfd is not initialized to -1 John > return -1; > } > [...snip...] -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list