utils/JSInfo.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit aa8633267d1d0e2079bb4a2b82bc7b36a4d306f5 Author: Albert Astals Cid <[email protected]> Date: Mon Mar 6 22:45:52 2017 +0100 pdfinfo: Fix memory leak when printing JS diff --git a/utils/JSInfo.cc b/utils/JSInfo.cc index 0028239..17b1032 100644 --- a/utils/JSInfo.cc +++ b/utils/JSInfo.cc @@ -34,7 +34,7 @@ JSInfo::~JSInfo() { } void JSInfo::printJS(GooString *js) { - Unicode *u; + Unicode *u = NULL; char buf[8]; int i, n, len; @@ -46,6 +46,7 @@ void JSInfo::printJS(GooString *js) { n = uniMap->mapUnicode(u[i], buf, sizeof(buf)); fwrite(buf, 1, n, file); } + gfree(u); } void JSInfo::scanLinkAction(LinkAction *link, const char *action, bool deleteLink) { _______________________________________________ poppler mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/poppler
