[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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



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 redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]