mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2024-11-28 05:19:18 +08:00
Merge pull request #1041 from stweil/leptonica
Use lept_free to free memory allocated by Leptonica
This commit is contained in:
commit
66e686a0e6
@ -331,7 +331,7 @@ void ImageData::SetPixInternal(Pix* pix, GenericVector<char>* image_data) {
|
||||
pixDestroy(&pix);
|
||||
image_data->resize_no_init(size);
|
||||
memcpy(&(*image_data)[0], data, size);
|
||||
free(data);
|
||||
lept_free(data);
|
||||
}
|
||||
|
||||
// Returns the Pix image for the image_data. Must be pixDestroyed after use.
|
||||
|
@ -809,7 +809,7 @@ void ScrollView::Image(struct Pix* image, int x_pos, int y_pos) {
|
||||
base64[code_len++] = kBase64Table[remainder & 63];
|
||||
SendRawMessage(base64);
|
||||
delete [] base64;
|
||||
free(data);
|
||||
lept_free(data);
|
||||
}
|
||||
|
||||
// Escapes the ' character with a \, so it can be processed by LUA.
|
||||
|
Loading…
Reference in New Issue
Block a user