After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 691548 - missing xmlFree in xsltCompileIdKeyPattern
missing xmlFree in xsltCompileIdKeyPattern
Status: RESOLVED FIXED
Product: libxslt
Classification: Platform
Component: general
git master
Other All
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2013-01-11 13:33 UTC by Vladimir Marek
Modified: 2013-08-05 11:09 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Vladimir Marek 2013-01-11 13:33:22 UTC
Hi,

While reviewing some change in xsltCompileIdKeyPattern, I noticed that there might be missing xmlFree:


current git source from line 1453:

    } else if (xmlStrEqual(name, (const xmlChar *)"processing-instruction")) {
	NEXT;
	SKIP_BLANKS;
	if (CUR != ')') {
	    lit = xsltScanLiteral(ctxt);
	    if (ctxt->error) {
		xsltTransformError(NULL, NULL, NULL,
			"xsltCompileIdKeyPattern : Literal expected\n");
		return;
	    }
	    SKIP_BLANKS;
	    if (CUR != ')') {
		xsltTransformError(NULL, NULL, NULL,
			"xsltCompileIdKeyPattern : ) expected\n");
		ctxt->error = 1;
                !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
		return;
	    }


Instead of the exclamation marks I believe there should be xmlFree(lit);

I have no reproducible case or anything, it's just pure observation of the code, so I might be wrong.
Comment 1 Nick Wellnhofer 2013-08-05 11:09:19 UTC
Fixed in commit a976434b. Thanks for the report.