diff options
author | Akim Demaille <akim.demaille@gmail.com> | 2021-02-26 07:35:21 +0100 |
---|---|---|
committer | Akim Demaille <akim.demaille@gmail.com> | 2021-02-26 07:36:11 +0100 |
commit | 15c61fb7124766b1ec46cc3c98f2502fc602e092 (patch) | |
tree | f2b1ed65f50c220667a5ea389ae92d1398315da2 /src | |
parent | f6eb1ac87bd08f2231fc28b14129c1b458da3bdf (diff) | |
download | bison-15c61fb7124766b1ec46cc3c98f2502fc602e092.tar.gz |
html: fix memory leak
* src/print-xml.c (print_html): Free allocated memory.
Diffstat (limited to 'src')
-rw-r--r-- | src/print-xml.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/print-xml.c b/src/print-xml.c index e9fb25c7..78801dbc 100644 --- a/src/print-xml.c +++ b/src/print-xml.c @@ -543,10 +543,10 @@ print_html (void) assert (xml_flag); char *xml2html = xpath_join (pkgdatadir (), "xslt/xml2xhtml.xsl"); - + char *xsltproc = muscle_percent_define_get ("tool.xsltproc"); char const *argv[11]; int i = 0; - argv[i++] = muscle_percent_define_get ("tool.xsltproc"); + argv[i++] = xsltproc; argv[i++] = "-o"; argv[i++] = spec_html_file; argv[i++] = xml2html; @@ -572,5 +572,6 @@ print_html (void) /* termsigp */ NULL); if (status) complain (NULL, complaint, _("%s failed with status %d"), argv[0], status); + free (xsltproc); free (xml2html); } |