[Libvir] also check for useless test-before-xmlFree

Some time ago, Daniel Veillard assured me that xmlFree(NULL) is valid in regular use, and with upstream code since January it's ok even in a debug mode that's not normally available because it's ifdef'd out: http://mail.gnome.org/archives/svn-commits-list/2008-January/msg02233.html Since the potential NULL-deref in debug mode is now gone, we can now use this to prevent any new useless tests: also check for useless test-before-xmlFree * Makefile.cfg (useless_free_options): Add --name=xmlFree. diff --git a/Makefile.cfg b/Makefile.cfg index e0d5528..cbf97c2 100644 --- a/Makefile.cfg +++ b/Makefile.cfg @@ -53,5 +53,6 @@ local-checks-to-skip = \ useless_free_options = \ --name=sexpr_free \ + --name=xmlFree \ --name=xmlXPathFreeContext \ --name=xmlXPathFreeObject -- 1.5.5.1.68.gbdcd8

On Tue, Apr 29, 2008 at 04:07:06PM +0200, Jim Meyering wrote:
Some time ago, Daniel Veillard assured me that xmlFree(NULL) is valid in regular use, and with upstream code since January it's
Yup it points to free() from libc, unless redefined by the user, but I don't expect that in an application using libvirt. +1 Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard@redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
participants (2)
-
Daniel Veillard
-
Jim Meyering