mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-07-10 08:12:33 +03:00
fix memory leak in arrow schema
This commit is contained in:
parent
4984c45da2
commit
fdfba982c8
|
@ -37,6 +37,10 @@ ReleaseExportedSchema(struct ArrowSchema *array) {
|
|||
child->release = NULL;
|
||||
}
|
||||
// UNDONE -- should I be releasing the children?
|
||||
free(array->children[i]);
|
||||
}
|
||||
if (array->children) {
|
||||
free(array->children);
|
||||
}
|
||||
|
||||
// Release dictionary
|
||||
|
@ -117,6 +121,7 @@ export_imaging_schema(Imaging im, struct ArrowSchema *schema) {
|
|||
retval = export_named_type(schema->children[0], im->arrow_band_format, "pixel");
|
||||
if (retval != 0) {
|
||||
free(schema->children[0]);
|
||||
free(schema->children);
|
||||
schema->release(schema);
|
||||
return retval;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user