Commit 7c6c1fef authored by Albert Astals Cid's avatar Albert Astals Cid

pdftotext: Fix memory leak in printLine

parent e8e95d2c
Pipeline #4001 passed with stage
in 6 minutes and 44 seconds
......@@ -500,9 +500,11 @@ static void printLine(FILE *f, TextLine *line) {
if (lineXMax < xMax) lineXMax = xMax;
if (lineYMax < yMax) lineYMax = yMax;
const std::string myString = myXmlTokenReplace(word->getText()->getCString());
GooString *wordText = word->getText();
const std::string myString = myXmlTokenReplace(wordText->getCString());
wordXML << " <word xMin=\"" << xMin << "\" yMin=\"" << yMin << "\" xMax=\"" <<
xMax << "\" yMax=\"" << yMax << "\">" << myString << "</word>\n";
delete wordText;
}
fprintf(f, " <line xMin=\"%f\" yMin=\"%f\" xMax=\"%f\" yMax=\"%f\">\n",
lineXMin, lineYMin, lineXMax, lineYMax);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment