There is a bug in GetNetworkID(): return(ret) with ret=list[i], after free(list). It leads to process abort on free(xref) in caller XMLDevID(). I corrected this by replacing:
ret = list[i];
by:
ret = malloc(16);
if (ret != NULL) strcpy(ret, list[i]);
Our tests were successful afterwards.
Daniel Veillard <veillard@xxxxxxxxxx>
20/11/2006 16:50
|
Pour : michel.ponceau@xxxxxxxx cc : libvir-list@xxxxxxxxxx Objet : Re: Patch to attach/detach virtual devices on a running domain |
On Thu, Nov 16, 2006 at 12:19:13PM -0500, Daniel Veillard wrote:
> On Tue, Nov 14, 2006 at 10:05:47AM -0500, Daniel Veillard wrote:
> > 5/ virDomainXMLDevID does direct acces to xs_directory() and xs_read(),
> > that's not proper it should not call xenStore directly that need to
> > be cleaned up, define one high level function exported from
> > xs_internal.[ch] and call that but no direct access should be done
> > that leads to unmaintainable code.
>
> That still need to be isolated, I added a TODO in src/xml.c to this effect.
Okay I have done it, as a new function xenStoreDomainGetNetworkID() from
xs_internal.[ch]
Could you check out the version from CVS and verify I didn't added any
regression ?
thanks,
Daniel
--
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard | virtualization library http://libvirt.org/
veillard@xxxxxxxxxx | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/