GNOME Bugzilla – Bug 166715
Invalid read reported by valgrind
Last modified: 2005-11-16 20:55:33 UTC
==19874== Invalid read of size 4 ==19874== at 0x1C23ED8A: xmlXPathFreeNodeSet__internal_alias (xpath.c:2221) ==19874== by 0x1C21E4D3: xmlHashFree__internal_alias (hash.c:307) ==19874== by 0x1C1766E4: xsltFreeDocumentKeys (keys.c:182) ==19874== by 0x1C17E784: xsltFreeDocuments (documents.c:228) ==19874== by 0x1C180EA5: xsltFreeTransformContext (transform.c:519) ==19874== by 0x805EAD2: xslt_pager_process (yelp-xslt-pager.c:278) ==19874== by 0x1C0FABAF: g_idle_dispatch (gmain.c:3821) ==19874== by 0x1C0F7D60: IA__g_main_context_dispatch (gmain.c:1947) ==19874== by 0x1C0F963E: g_main_context_iterate (gmain.c:2578) ==19874== by 0x1C0F98BF: IA__g_main_loop_run (gmain.c:2782) ==19874== by 0x1BFCC098: bonobo_main (bonobo-main.c:297) ==19874== by 0x805F903: main (yelp-main.c:387)
This is the code it complains about (yelp-xslt-pager.c:278) if (priv->transformContext) { xsltFreeTransformContext (priv->transformContext); /* beep beep */ priv->transformContext = NULL; }
Hi, This is caused by xsltFreeTransformContext trying to free some internal stuff that has already been freed (in one of its docs). Freeing the actual document after the transform context stops libxml doing this, removing the invalid read. Committed to CVS HEAD. 2005-11-16 Don Scorgie <dscorgie@cvs.gnome.org> * src/yelp-xslt-pager.c: Fix invalid read (bug #166715)