utils/HtmlOutputDev.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit af5565087b63aebfbb20a155dd9318312f688f92 Author: Alex Henrie <[email protected]> Date: Wed Mar 11 17:06:16 2020 -0600 Fix memory leak in HtmlOutputDev::getLinkDest diff --git a/utils/HtmlOutputDev.cc b/utils/HtmlOutputDev.cc index 0212626b..5be687ab 100644 --- a/utils/HtmlOutputDev.cc +++ b/utils/HtmlOutputDev.cc @@ -1546,7 +1546,6 @@ GooString* HtmlOutputDev::getLinkDest(AnnotLink *link){ { case actionGoTo: { - GooString* file = new GooString(gbasename(Docname->c_str())); int destPage=1; LinkGoTo *ha=(LinkGoTo *)link->getAction(); std::unique_ptr<LinkDest> dest; @@ -1556,6 +1555,8 @@ GooString* HtmlOutputDev::getLinkDest(AnnotLink *link){ dest=catalog->findDest(ha->getNamedDest()); if (dest){ + GooString* file = new GooString(gbasename(Docname->c_str())); + if (dest->isPageRef()){ const Ref pageref=dest->getPageRef(); destPage=catalog->findPage(pageref); _______________________________________________ poppler mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/poppler
