File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -147,13 +147,22 @@ func OpenSnapDiff(config SnapDiffConfig) (*SnapDiffInfo, error) {
147147
148148 rawCephSnapDiffInfo := & C._ceph_snapdiff_info {}
149149
150+ cRootPath := C .CString (config .RootPath )
151+ defer C .free (unsafe .Pointer (cRootPath ))
152+ cRelPath := C .CString (config .RelPath )
153+ defer C .free (unsafe .Pointer (cRelPath ))
154+ cSnap1 := C .CString (config .Snap1 )
155+ defer C .free (unsafe .Pointer (cSnap1 ))
156+ cSnap2 := C .CString (config .Snap2 )
157+ defer C .free (unsafe .Pointer (cSnap2 ))
158+
150159 ret := C .open_snapdiff_dlsym (
151160 cephOpenSnapDiff ,
152161 config .CMount .mount ,
153- C . CString ( config . RootPath ) ,
154- C . CString ( config . RelPath ) ,
155- C . CString ( config . Snap1 ) ,
156- C . CString ( config . Snap2 ) ,
162+ cRootPath ,
163+ cRelPath ,
164+ cSnap1 ,
165+ cSnap2 ,
157166 rawCephSnapDiffInfo )
158167
159168 if ret != 0 {
You can’t perform that action at this time.
0 commit comments