[libvirt] [PATCH] Avoid segv if ncf_init fails

David Lutterkort lutter at redhat.com
Tue Oct 27 14:23:24 UTC 2009


On Fri, 2009-10-23 at 20:31 +0100, Daniel P. Berrange wrote:
> On Fri, Oct 23, 2009 at 03:13:17PM -0400, Laine Stump wrote:
> > If ncf_init() fails, it takes responsibility to call ncf_close() when
> > appropriate. Having libvirt call it results in a double close, which
> > ends up segv'ing.
> 
> Hmm, it would be good if ncf_init  set the passed in pointer to NULL
> when it failed, then your existing cleanup check would have been
> safe.

Agreed - that that doesn't happen was an oversight. I'll fix that.

David





More information about the libvir-list mailing list