Merge pull request #1041 from stweil/leptonica

Use lept_free to free memory allocated by Leptonica
This commit is contained in:
Egor Pugin 2017-07-16 18:04:54 +03:00 committed by GitHub
commit 66e686a0e6
2 changed files with 2 additions and 2 deletions

View File

@ -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.

View File

@ -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.