Index: trunk/src/hid/common/flags.c =================================================================== --- trunk/src/hid/common/flags.c (revision 1274) +++ trunk/src/hid/common/flags.c (revision 1275) @@ -61,8 +61,10 @@ for(e = htsp_first(hid_flags); e; e = htsp_next(hid_flags, e)) { ha = e->value; - if (ha->cookie == cookie) + if (ha->cookie == cookie) { htsp_pop(hid_flags, e->key); + free(ha); + } } }