CID 1099199 (#1 of 1): Read from pointer after free (USE_AFTER_FREE)
20. deref_after_free: Dereferencing freed pointer elem.
Change-Id: I85c34f351db0cc10ce384176b90ba72067e3c051
Signed-off-by: Youngjae Cho <y0.cho@samsung.com>
static void pmqos_unlock_timeout_update(void)
{
- dd_list *elem;
+ dd_list *elem, *elem_next;
struct pmqos_cpu *cpu;
int delta = 0;
/* Delete previous request */
}
- DD_LIST_FOREACH(pmqos_head, elem, cpu) {
+ DD_LIST_FOREACH_SAFE(pmqos_head, elem, elem_next, cpu) {
if (cpu->timeout > 0)
continue;
DD_LIST_REMOVE(pmqos_head, cpu);