Ali Behjati пре 2 година
родитељ
комит
f394d9e761
3 измењених фајлова са 3 додато и 3 уклоњено
  1. 1 1
      hermes/Cargo.lock
  2. 1 1
      hermes/Cargo.toml
  3. 1 1
      hermes/src/network/p2p.go

+ 1 - 1
hermes/Cargo.lock

@@ -1926,7 +1926,7 @@ checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
 
 [[package]]
 name = "hermes"
-version = "0.1.0"
+version = "0.1.1"
 dependencies = [
  "anyhow",
  "async-trait",

+ 1 - 1
hermes/Cargo.toml

@@ -1,6 +1,6 @@
 [package]
 name                           = "hermes"
-version                        = "0.1.0"
+version                        = "0.1.1"
 edition                        = "2021"
 
 [dependencies]

+ 1 - 1
hermes/src/network/p2p.go

@@ -203,11 +203,11 @@ func RegisterObservationCallback(f C.callback_t, network_id, bootstrap_addrs, li
 					case *GossipMessage_SignedVaaWithQuorum:
 						vaaBytes := msg.GetSignedVaaWithQuorum().GetVaa()
 						cBytes := C.CBytes(vaaBytes)
-						defer C.free(cBytes)
 						C.invoke(f, C.observation_t{
 							vaa:     (*C.char)(cBytes),
 							vaa_len: C.size_t(len(vaaBytes)),
 						})
+						C.free(cBytes)
 					}
 				}
 			}