sdk icon indicating copy to clipboard operation
sdk copied to clipboard

libice has 2 Memory leak

Open y82313650 opened this issue 2 years ago • 4 comments

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; }

y82313650 avatar Apr 11 '22 09:04 y82313650

感谢反馈,我尝试分析下这块代码,可能还需要晚几天才能回复。

ireader avatar Apr 30 '22 01:04 ireader

居然是个国人,定时器和start方法都有内存泄露风险。我已经修改验证了。

---Original--- From: @.> Date: Sat, Apr 30, 2022 09:43 AM To: @.>; Cc: @.@.>; Subject: Re: [ireader/sdk] libice has 2 Memory leak (Issue #33)

感谢反馈,我尝试分析下这块代码,可能还需要晚几天才能回复。

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

y82313650 avatar May 01 '22 01:05 y82313650

方便的话提个MR?

ireader avatar May 01 '22 01:05 ireader

行,我等会提一下

---Original--- From: @.> Date: Sun, May 1, 2022 09:46 AM To: @.>; Cc: @.@.>; Subject: Re: [ireader/sdk] libice has 2 Memory leak (Issue #33)

方便的话提个MR?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

y82313650 avatar May 01 '22 01:05 y82313650