list entry was not updated properly during flushing of packets
<call stack>
flush_pkt_list (list=0x638b40 <net+64>) at tools/mesh-gatt/net.c:1199
net_session_close (data_in=<optimized out>) at tools/mesh-gatt/net.c:1979
disconnect_device (cb=cb@entry=0x0, user_data=user_data@entry=0x0)
at tools/meshctl.c:791
cmd_start_prov (argc=<optimized out>, argv=0x6a9fb0)
at tools/meshctl.c:1789
Change-Id: I5e7827fe7faf8e3611789123373fd5074aabc46b
Signed-off-by: Abhay Agarwal <ay.agarwal@samsung.com>
pkt = l->data;
*list = g_list_remove(*list, pkt);
g_free(pkt);
+ l = g_list_first(*list);
}
}