[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Linphone-developers] memleak in mediastreamer
From: |
Ghislain MARY |
Subject: |
Re: [Linphone-developers] memleak in mediastreamer |
Date: |
Wed, 12 Jul 2017 13:45:39 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 |
Hi Christian,
You're absolutely right, there's a memory leak there.
I just commited a fix in mediastreamer2:
commit 54d70169171bab26e257ff6f1f731e0d8eaa6fa3 (HEAD -> master, origin/master,
origin/HEAD)
Author: Ghislain MARY <address@hidden>
Date: Wed Jul 12 13:43:30 2017 +0200
Fix memory leak in RFC3984 unpacker.
Thanks very much for your bug report and for pointing exactly what was
wrong.
Cheers,
Ghislain
On 07/12/2017 01:08 PM, Christian Spielberger wrote:
Hi,
we have our own mediastreamer plugin which does h264 encoding/decoding. I found
that there is a memleak in rfc3984_unpack. And yes, I use rfc3984_init during
initialization and rfc3984_uninit at the end of the stream.
==7116== 1,964 (+1,748) (432 (+216) direct, 1,532 (+1,532) indirect) bytes in 2
(+1) blocks are definitely lost in loss record 6,378 of 6,569
==7116== at 0x4C2AB80: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==7116== by 0x557301D: ortp_malloc0 (port.c:82)
==7116== by 0x557FAF6: dupb (str_utils.c:157)
==7116== by 0x557FB8B: dupmsg (str_utils.c:169)
==7116== by 0x7527847: update_parameter_set (rfc3984.c:313)
==7116== by 0x7527935: store_nal (rfc3984.c:330)
==7116== by 0x7527D43: rfc3984_unpack2 (rfc3984.c:414)
==7116== by 0x7528028: rfc3984_unpack (rfc3984.c:264)
==7116== by 0x16EAACB3: dec_process (in
/usr/local/lib/mediastreamer/plugins/libmsgstdsp.so.0.0.0)
==7116== by 0x7758C3F: ms_filter_process (msfilter.c:207)
==7116== by 0x77594A6: call_process (msticker.c:231)
==7116== by 0x77594A6: run_graph (msticker.c:245)
==7116== by 0x7759469: run_graph (msticker.c:250)
I suppose that something like
freemsg(ctx->last_sps)
freemsg(ctx->last_pps)
is missing in rfc3984_uninit.
regards,
Chris.