The following crash happens because the list l is modified within the
loop so it is no longer safe to call l->next directly:
Invalid read of size 8
at 0x41F276: pending_create (avctp.c:1491)
by 0x41F7C0: avctp_send_req.isra.6 (avctp.c:1539)
by 0x41F887: avctp_passthrough_release (avctp.c:1643)
by 0x41F9DF: avctp_passthrough_rsp (avctp.c:1698)
by 0x41E9AC: session_cb (avctp.c:782)
by 0x31D1647DF5: g_main_context_dispatch (in /usr/lib64/libglib-2.0.so.0.3600.3)
by 0x31D1648147: ??? (in /usr/lib64/libglib-2.0.so.0.3600.3)
by 0x31D1648549: g_main_loop_run (in /usr/lib64/libglib-2.0.so.0.3600.3)
by 0x40A49F: main (main.c:587)
Address 0x8 is not stack'd, malloc'd or (recently) free'd
tmp = g_slist_copy(chan->processed);
/* Find first unused transaction id */
- for (l = tmp; l; l = l->next) {
+ for (l = tmp; l; l = g_slist_next(l)) {
struct avctp_pending_req *req = l->data;
if (req->transaction == chan->transaction) {