mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2025-01-19 15:03:45 +08:00
Destroy box before potentially exiting function
This commit is contained in:
parent
d3a0768c32
commit
ca5735efcb
@ -196,8 +196,8 @@ ImageData* Tesseract::GetRectImage(const TBOX& box, const BLOCK& block,
|
||||
Box* clip_box = boxCreate(revised_box->left(), height - revised_box->top(),
|
||||
revised_box->width(), revised_box->height());
|
||||
Pix* box_pix = pixClipRectangle(pix, clip_box, nullptr);
|
||||
if (box_pix == nullptr) return nullptr;
|
||||
boxDestroy(&clip_box);
|
||||
if (box_pix == nullptr) return nullptr;
|
||||
if (num_rotations > 0) {
|
||||
Pix* rot_pix = pixRotateOrth(box_pix, num_rotations);
|
||||
pixDestroy(&box_pix);
|
||||
|
Loading…
Reference in New Issue
Block a user