From e815faa792a22844b273fe6b0bda9557af1a4a7e Mon Sep 17 00:00:00 2001 From: Bastian Bloessl Date: Tue, 1 Mar 2016 07:40:43 -0800 Subject: [PATCH] fix use after free --- lib/ofdm_mac.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ofdm_mac.cc b/lib/ofdm_mac.cc index b16dd2f..6f5ec7a 100644 --- a/lib/ofdm_mac.cc +++ b/lib/ofdm_mac.cc @@ -83,6 +83,7 @@ void app_in (pmt::pmt_t msg) { size_t msg_len; const char *msdu; + std::string str; if(pmt::is_eof_object(msg)) { 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)) { - std::string str; str = pmt::symbol_to_string(msg); msg_len = str.length(); msdu = str.data();