linphone-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Linphone-developers] Possible memory leak in 2.99.3


From: Simon Morlat
Subject: Re: [Linphone-developers] Possible memory leak in 2.99.3
Date: Thu, 25 Sep 2008 14:59:09 +0200
User-agent: KMail/1.9.9

Hi,

Thank you very much. You are right.
I modified the svn code accordingly.

Simon

Le Thursday 25 September 2008 06:04:49 mini core2, vous avez écrit :
> Dear Sirs:
>   When I am using the mediastreamer in writing a soft videophone in WIN32
> platform, I found 2 memory leaks in the mediastreamer. The original code of
> "video_out_uninit" in "videoout.c" is
>
> static void video_out_uninit(MSFilter *f){
>     VideoOut *obj=(VideoOut*)f->data;
>     if (obj->display!=NULL && obj->own_display)
>         ms_display_destroy(obj->display);
>     if (obj->sws1!=NULL){
>         sws_freeContext(obj->sws1);
>         obj->sws1=NULL;
>     }
>     if (obj->sws2!=NULL){
>         sws_freeContext(obj->sws2);
>         obj->sws2=NULL;
>     }
>
>     ms_free(obj);
> }
>
>   And when I use it in the windows, I found the memory leak happened
> whenever I make a call to linphone. And after debugging, the code seems to
> not free the allocated memory of local_msg and tmp_local_msg. So I suggest
> to add the code as in "video_out_preprocess" to "video_out_uninit"
>
> static void video_out_uninit(MSFilter *f){
>     VideoOut *obj=(VideoOut*)f->data;
>     if (obj->display!=NULL && obj->own_display)
>         ms_display_destroy(obj->display);
>     if (obj->sws1!=NULL){
>         sws_freeContext(obj->sws1);
>         obj->sws1=NULL;
>     }
>     if (obj->sws2!=NULL){
>         sws_freeContext(obj->sws2);
>         obj->sws2=NULL;
>     }
>
>     /* minicore2, without this may have a memory leak after finish a video
> call. */ if (obj->local_msg!=NULL) {
>         freemsg(obj->local_msg);
>         obj->local_msg=NULL;
>     }
>     if (obj->tmp_local_msg!=NULL) {
>         freemsg(obj->tmp_local_msg);
>         obj->tmp_local_msg=NULL;
>     }
>
>     ms_free(obj);
> }
>
> Sincerely,
> /minicore2
>
>
> _________________________________________________________________
> 5 GB 超大容量 、創新便捷、安全防護垃圾郵件和病毒 — 立即升級 Windows Live Hotmail
> http://mail.live.com
>
>
> _______________________________________________
> Linphone-developers mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/linphone-developers






reply via email to

[Prev in Thread] Current Thread [Next in Thread]