Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion internal/storagev2/packed/packed_writer_ffi.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,14 @@
}

func (pw *FFIPackedWriter) Close() (string, error) {
if pw.cWriterHandle == nil {

Check failure on line 170 in internal/storagev2/packed/packed_writer_ffi.go

View workflow job for this annotation

GitHub Actions / Code Checker MacOS

invalid operation: pw.cWriterHandle == nil (mismatched types _Ctype_LoonWriterHandle and untyped nil)
return "", nil
}

var cColumnGroups *C.LoonColumnGroups

result := C.loon_writer_close(pw.cWriterHandle, nil, nil, 0, &cColumnGroups)
pw.cWriterHandle = nil

Check failure on line 177 in internal/storagev2/packed/packed_writer_ffi.go

View workflow job for this annotation

GitHub Actions / Code Checker MacOS

cannot use nil as _Ctype_LoonWriterHandle value in assignment
if err := HandleLoonFFIResult(result); err != nil {
return "", err
}
Expand Down Expand Up @@ -197,6 +202,7 @@

log.Info("FFI writer closed", zap.Int64("version", int64(cCommitVersion)))

defer C.loon_properties_free(pw.cProperties)
C.loon_properties_free(pw.cProperties)
pw.cProperties = nil
return MarshalManifestPath(pw.basePath, int64(cCommitVersion)), nil
}
Loading