Commit 2cfb5aa9 authored by wujing's avatar wujing

Fix segfault when free memory in vnf_p7

parent d1d9e475
...@@ -290,9 +290,9 @@ void vnf_p7_rx_reassembly_queue_remove_old_msgs(vnf_p7_t* vnf_p7, vnf_p7_rx_reas ...@@ -290,9 +290,9 @@ void vnf_p7_rx_reassembly_queue_remove_old_msgs(vnf_p7_t* vnf_p7, vnf_p7_rx_reas
NFAPI_TRACE(NFAPI_TRACE_INFO, "Deleting stale reassembly message (%u %u %d)\n", iterator->rx_hr_time, rx_hr_time, delta); NFAPI_TRACE(NFAPI_TRACE_INFO, "Deleting stale reassembly message (%u %u %d)\n", iterator->rx_hr_time, rx_hr_time, delta);
iterator = iterator->next;
#ifndef PHY_RM #ifndef PHY_RM
vnf_p7_rx_message_t* to_delete = iterator; vnf_p7_rx_message_t* to_delete = iterator;
iterator = iterator->next;
// delete the message // delete the message
uint16_t i; uint16_t i;
for(i = 0; i < 128; ++i) for(i = 0; i < 128; ++i)
...@@ -302,6 +302,8 @@ void vnf_p7_rx_reassembly_queue_remove_old_msgs(vnf_p7_t* vnf_p7, vnf_p7_rx_reas ...@@ -302,6 +302,8 @@ void vnf_p7_rx_reassembly_queue_remove_old_msgs(vnf_p7_t* vnf_p7, vnf_p7_rx_reas
} }
vnf_p7_free(vnf_p7, to_delete); vnf_p7_free(vnf_p7, to_delete);
to_delete = 0; to_delete = 0;
#else
iterator = iterator->next;
#endif #endif
} }
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment