[libvirt] [PATCH v4 4/7] Add network events to the remote driver

Cedric Bosdonnat cbosdonnat at suse.com
Thu Dec 12 14:30:08 UTC 2013


Hi John,

On Thu, 2013-12-12 at 06:50 -0500, John Ferlan wrote:
> 4920 	
> 
> (3) Event returned_null: 	Function "virNetworkEventLifecycleNew(char const *, unsigned char const *, int)" returns null (checked 10 out of 11 times). [details]
> (14) Event var_assigned: 	Assigning: "event" = null return value from "virNetworkEventLifecycleNew(char const *, unsigned char const *, int)".
> Also see events: 	[example_assign][example_checked][example_assign][example_checked][example_assign][example_checked][example_assign][example_checked][example_assign][example_checked][dereference]
> 
> 4921 	    event = virNetworkEventLifecycleNew(net->name, net->uuid, msg->event);
> 
> > +    event = virNetworkEventLifecycleNew(net->name, net->uuid, msg->event);
> > +    virNetworkFree(net);
> > +
> 
> (15) Event dereference: 	Dereferencing a pointer that might be null "event" when calling "remoteDomainEventQueue(struct private_data *, virObjectEventPtr)". [details]
> Also see events: 	[returned_null][example_assign][example_checked][example_assign][example_checked][example_assign][example_checked][example_assign][example_checked][example_assign][example_checked][var_assigned]
> 
> 
> > +    remoteDomainEventQueue(priv, event);
> > +}
> > +
> > +
> 
> Essentially - you need to check for NULL event.

Sure, but the weird thing it that it should also complain on the similar
functions for domain events, right above this one in the same file.

--
Cedric




More information about the libvir-list mailing list