[Bugfix][API-759] after multiple module init, then de-init, last call lynq-network-deinit, coredump 2
Change-Id: Ie0fac63ddc7b068f53c44142a71282dd974ed808
diff --git a/src/lynq/lib/liblynq-call/lynq_module_socket.cpp b/src/lynq/lib/liblynq-call/lynq_module_socket.cpp
index a7f1ec7..ff45c02 100755
--- a/src/lynq/lib/liblynq-call/lynq_module_socket.cpp
+++ b/src/lynq/lib/liblynq-call/lynq_module_socket.cpp
@@ -320,6 +320,7 @@
int res = 0;
lynq_head_t* phead;
int level,index,size;
+ uint8_t * shm_buffer;
LYINFLOG("urc recv thread is running");
while(module_urc_status)
@@ -345,7 +346,9 @@
}
if(urc_data_is_in_shm_data(phead->resp_type,level,index,size))
{
- urc_p->setData((uint8_t *)get_shem_buffer(level,index),size); // p.setData((uint8_t *) buffer, buflen);
+ shm_buffer = (uint8_t *) get_shem_buffer(level,index);
+ LYINFLOG("shm pointer is %p", shm_buffer);
+ urc_p->setData(shm_buffer,size); // p.setData((uint8_t *) buffer, buflen);
}
else if(res>=sizeof(int32_t)*3)
{