Merge pull request #2021 from stweil/lgtm

tesseractmain: Fix memory leak
This commit is contained in:
zdenop 2018-10-22 18:56:57 +02:00 committed by GitHub
commit 69a2e94bc5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -413,6 +413,7 @@ static void PreloadRenderers(
if (renderer->happy()) {
renderers->push_back(renderer);
} else {
delete renderer;
tprintf("Error, could not create hOCR output file: %s\n",
strerror(errno));
}
@ -427,6 +428,7 @@ static void PreloadRenderers(
if (renderer->happy()) {
renderers->push_back(renderer);
} else {
delete renderer;
tprintf("Error, could not create TSV output file: %s\n",
strerror(errno));
}
@ -446,6 +448,7 @@ static void PreloadRenderers(
if (renderer->happy()) {
renderers->push_back(renderer);
} else {
delete renderer;
tprintf("Error, could not create PDF output file: %s\n",
strerror(errno));
}
@ -458,6 +461,7 @@ static void PreloadRenderers(
if (renderer->happy()) {
renderers->push_back(renderer);
} else {
delete renderer;
tprintf("Error, could not create UNLV output file: %s\n",
strerror(errno));
}
@ -470,6 +474,7 @@ static void PreloadRenderers(
if (renderer->happy()) {
renderers->push_back(renderer);
} else {
delete renderer;
tprintf("Error, could not create BOX output file: %s\n",
strerror(errno));
}
@ -482,6 +487,7 @@ static void PreloadRenderers(
if (renderer->happy()) {
renderers->push_back(renderer);
} else {
delete renderer;
tprintf("Error, could not create TXT output file: %s\n",
strerror(errno));
}