Skip to content

Commit ef89317

Browse files
authored
fix: use correct CGo syntax for Free (#478)
1 parent e85c70c commit ef89317

File tree

1 file changed

+2
-2
lines changed
  • rollup/circuitcapacitychecker

1 file changed

+2
-2
lines changed

rollup/circuitcapacitychecker/impl.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func (ccc *CircuitCapacityChecker) ApplyTransaction(traces *types.BlockTrace) (*
7373
log.Debug("start to check circuit capacity for tx", "id", ccc.ID, "TxHash", traces.Transactions[0].TxHash)
7474
rawResult := C.apply_tx(C.uint64_t(ccc.ID), tracesStr)
7575
defer func() {
76-
C.free(rawResult)
76+
C.free(unsafe.Pointer(rawResult))
7777
}()
7878
log.Debug("check circuit capacity for tx done", "id", ccc.ID, "TxHash", traces.Transactions[0].TxHash)
7979

@@ -122,7 +122,7 @@ func (ccc *CircuitCapacityChecker) ApplyBlock(traces *types.BlockTrace) (*types.
122122
log.Debug("start to check circuit capacity for block", "id", ccc.ID, "blockNumber", traces.Header.Number, "blockHash", traces.Header.Hash())
123123
rawResult := C.apply_block(C.uint64_t(ccc.ID), tracesStr)
124124
defer func() {
125-
C.free(rawResult)
125+
C.free(unsafe.Pointer(rawResult))
126126
}()
127127
log.Debug("check circuit capacity for block done", "id", ccc.ID, "blockNumber", traces.Header.Number, "blockHash", traces.Header.Hash())
128128

0 commit comments

Comments
 (0)