[poppler] utils/JSInfo.cc
Albert Astals Cid
aacid at kemper.freedesktop.org
Mon Mar 6 21:46:09 UTC 2017
utils/JSInfo.cc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit aa8633267d1d0e2079bb4a2b82bc7b36a4d306f5
Author: Albert Astals Cid <aacid at kde.org>
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) {
More information about the poppler
mailing list