summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2019-07-04 18:16:09 +0200
committerJulien Nabet <serval2412@yahoo.fr>2019-07-04 23:17:06 +0200
commit2f6ead197bbff5142199d00a30ab900ebb997754 (patch)
tree41b88e88ffa817edc11ae29435aa0ffd6d2ff116
parent70d9e2db8a53a994e323dbb07d42eaebaf5008af (diff)
cid#1448425: Resource leak (sc/htmlprovider)
Change-Id: I3c23280da75e51be37c4b66f14f805ca49ebf3cf Reviewed-on: https://gerrit.libreoffice.org/75095 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
-rw-r--r--sc/source/ui/dataprovider/htmldataprovider.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/sc/source/ui/dataprovider/htmldataprovider.cxx b/sc/source/ui/dataprovider/htmldataprovider.cxx
index 516a0b308376..bbe6dd3c514b 100644
--- a/sc/source/ui/dataprovider/htmldataprovider.cxx
+++ b/sc/source/ui/dataprovider/htmldataprovider.cxx
@@ -195,7 +195,12 @@ void HTMLFetchThread::execute()
xmlNodeSetPtr pXmlNodes = pXmlXpathObj->nodesetval;
if (pXmlNodes->nodeNr == 0)
+ {
+ xmlXPathFreeNodeSet(pXmlNodes);
+ xmlXPathFreeNodeSetList(pXmlXpathObj);
+ xmlXPathFreeContext(pXmlXpathCtx);
return;
+ }
xmlNodePtr pNode = pXmlNodes->nodeTab[0];
handleTable(pNode);