[libvirt] PATCH: Fix virRealloc for zero-sized alloc

Daniel Veillard veillard at redhat.com
Tue Oct 14 12:19:08 UTC 2008


On Fri, Oct 10, 2008 at 07:18:44PM +0100, Daniel P. Berrange wrote:
> The change to use arrays instead of linked-lists exposed a tiny bug in
> the virReallocN function. The realloc() contract says that if size is
> zero, then its semantics are the same as free(). virReallocN wasn't
> matching this, instead returning failure, and not setting the original
> pointer to NULL as expected. I've just committed this patch to fix this
> bug which was causing test suite crashes

  yup looks just fine !

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel at veillard.com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/




More information about the libvir-list mailing list