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

Jim Meyering jim at meyering.net
Tue Apr 29 14:07:06 UTC 2008

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:


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	\

More information about the libvir-list mailing list