[libvirt] [PATCH] network: free/null newDef if network fails to start

Eric Blake eblake at redhat.com
Fri Oct 19 19:55:57 UTC 2012


On 10/19/2012 11:34 AM, Laine Stump wrote:
> https://bugzilla.redhat.com/show_bug.cgi?id=866364
> 
> pointed out a crash due to virNetworkObjAssignDef free'ing
> network->newDef without NULLing it afterward. A fix for this is in
> upstream commit b7e9202401ebaa039b8f05acdefda8c24081537a. While the
> NULLing of newDef was a legitimate fix, newDef should have already
> been empty (NULL) anyway (as indicated in the comment that was deleted
> by that commit).
> 

> 
> Since I love things to be symmetric, I created a new function called
> virNetworkObjUnsetDefTransient(), which reverses the effects of
> virNetworkObjSetDefTransient(). I don't really like the name of the
> new function, but then I also didn't really like the name of the old
> one either (it's just named that way to match a similar function in
> the domain conf code).

Alas, I don't have any bettter suggestions for a name, so I guess we go
with your first choice.

ACK.

-- 
Eric Blake   eblake at redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 617 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20121019/7409afa0/attachment-0001.sig>


More information about the libvir-list mailing list