fix use after free

This commit is contained in:
Bastian Bloessl
2016-03-01 07:40:43 -08:00
parent 298d9823cc
commit e815faa792
+1 -1
View File
@@ -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();