mirror of
https://github.com/logos-messaging/logos-messaging-rust-bindings.git
synced 2026-01-10 01:43:11 +00:00
Dangling double free on waku default pubsub topic
This commit is contained in:
parent
cbfa4121df
commit
8290daa5fd
@ -86,7 +86,7 @@ pub fn waku_create_pubsub_topic(topic_name: &str, encoding: Encoding) -> WakuPub
|
||||
pub fn waku_dafault_pubsub_topic() -> WakuPubSubTopic {
|
||||
let result_ptr = unsafe { waku_sys::waku_default_pubsub_topic() };
|
||||
|
||||
let result = unsafe { CString::from_raw(result_ptr) }
|
||||
let result = unsafe { CStr::from_ptr(result_ptr) }
|
||||
.to_str()
|
||||
.expect("&str from result should always be extracted")
|
||||
.parse()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user