fix use after free
This commit is contained in:
+1
-1
@@ -83,6 +83,7 @@ void app_in (pmt::pmt_t msg) {
|
|||||||
|
|
||||||
size_t msg_len;
|
size_t msg_len;
|
||||||
const char *msdu;
|
const char *msdu;
|
||||||
|
std::string str;
|
||||||
|
|
||||||
if(pmt::is_eof_object(msg)) {
|
if(pmt::is_eof_object(msg)) {
|
||||||
message_port_pub(pmt::mp("phy out"), pmt::PMT_EOF);
|
message_port_pub(pmt::mp("phy out"), pmt::PMT_EOF);
|
||||||
@@ -91,7 +92,6 @@ void app_in (pmt::pmt_t msg) {
|
|||||||
|
|
||||||
} else if(pmt::is_symbol(msg)) {
|
} else if(pmt::is_symbol(msg)) {
|
||||||
|
|
||||||
std::string str;
|
|
||||||
str = pmt::symbol_to_string(msg);
|
str = pmt::symbol_to_string(msg);
|
||||||
msg_len = str.length();
|
msg_len = str.length();
|
||||||
msdu = str.data();
|
msdu = str.data();
|
||||||
|
|||||||
Reference in New Issue
Block a user