mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-02 03:48:37 +08:00
Fix cgo pointer param error (#27313)
Signed-off-by: xige-16 <xi.ge@zilliz.com>
This commit is contained in:
parent
1d76565894
commit
fa06265756
@ -86,11 +86,11 @@ func GetCProtoBlob(cProto *C.CProto) []byte {
|
||||
|
||||
func GetLocalUsedSize(path string) (int64, error) {
|
||||
var availableSize int64
|
||||
cSize := C.int64_t(availableSize)
|
||||
cSize := (*C.int64_t)(&availableSize)
|
||||
cPath := C.CString(path)
|
||||
defer C.free(unsafe.Pointer(cPath))
|
||||
|
||||
status := C.GetLocalUsedSize(cPath, &cSize)
|
||||
status := C.GetLocalUsedSize(cPath, cSize)
|
||||
err := HandleCStatus(&status, "get local used size failed")
|
||||
if err != nil {
|
||||
return 0, err
|
||||
|
Loading…
Reference in New Issue
Block a user