File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed
Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -461,6 +461,10 @@ func (imp *cimporter) doImportArr(src *CArrowArray) error {
461461 imp .alloc = & importAllocator {arr : imp .arr }
462462 }
463463
464+ if err := imp .doImport (); err != nil {
465+ return err
466+ }
467+
464468 // we tie the releasing of the array to when the buffers are
465469 // cleaned up, so if there are no buffers that we've imported
466470 // such as for a null array or a nested array with no bitmap
@@ -469,14 +473,12 @@ func (imp *cimporter) doImportArr(src *CArrowArray) error {
469473 // memory that we have to track the lifetime of.
470474 defer func () {
471475 if imp .alloc .bufCount .Load () == 0 {
472- if C .ArrowArrayIsReleased (imp .arr ) == 0 {
473- C .ArrowArrayRelease (imp .arr )
474- C .free (unsafe .Pointer (imp .arr ))
475- }
476+ C .ArrowArrayRelease (imp .arr )
477+ C .free (unsafe .Pointer (imp .arr ))
476478 }
477479 }()
478480
479- return imp . doImport ()
481+ return nil
480482}
481483
482484// import is called recursively as needed for importing an array and its children
You can’t perform that action at this time.
0 commit comments