mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-08 10:44:09 -04:00
Fix mem leak on loading multiple PDFs with buffe rin single doc
This commit is contained in:
parent
a79795dca9
commit
0638359f0f
@ -46,6 +46,7 @@ PDFDoc_load(PDFDoc *self, PyObject *args) {
|
||||
|
||||
try {
|
||||
self->doc->LoadFromBuffer(bufferview(buffer, size));
|
||||
Py_CLEAR(self->load_buffer_ref);
|
||||
self->load_buffer_ref = args;
|
||||
Py_INCREF(args);
|
||||
} catch(const PdfError & err) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user