Dangling double free on waku create pubsub topic

This commit is contained in:
Daniel Sanchez Quiros 2023-02-16 17:10:30 +01:00
parent 8290daa5fd
commit f80947d283

View File

@ -71,7 +71,7 @@ pub fn waku_create_pubsub_topic(topic_name: &str, encoding: Encoding) -> WakuPub
res
};
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()