Skip to content

libice has 2 Memory leak #33

@y82313650

Description

@y82313650

in case,i want to realization a keepalive stun request,so i call ice_agent_start every 2 second with same ice_agent*.
in ice-checklist.c#157
darray_clear(&l->valids);
darray_clear(&l->trigger);
ice_candidate_components_clear(&l->components); // reset components
this code will reset darray->count = 0; but never free darry. so i change this code
darray_free(&l->valids);
darray_free(&l->trigger);
ice_candidate_components_free(&l->components);

another memory leak in ice-checklist.c #530 ice_checklist_ontimer
l->timer = stun_timer_start(ICE_TIMER_INTERVAL * ice_agent_active_checklist_count(l->ice), ice_checklist_ontimer, l);
checklist* l will obtain timer but never free,so i free this code in ice_checklist_ontimer#466
l = (struct ice_checklist_t*)param;
locker_lock(&l->locker);
assert(ICE_CHECKLIST_FROZEN != l->state);
if(l->timer){
free(l->timer);
l->timer = NULL;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions