Skip to content

rtp: opuspay: fix memory leak in gst_rtp_opus_pay_setcaps.

The src caps were never dereferenced, causing a memory leak.

Valgrind trace of the leak:

==13874== 601 (72 direct, 529 indirect) bytes in 1 blocks are definitely lost in loss record 4,801 of 4,918
==13874==    at 0x483877F: malloc (vg_replace_malloc.c:299)
==13874==    by 0x4C43289: g_malloc (in /usr/lib/libglib-2.0.so.0.6000.5)
==13874==    by 0x4C25673: g_slice_alloc (in /usr/lib/libglib-2.0.so.0.6000.5)
==13874==    by 0x4B69B8C: gst_caps_new_empty (gstcaps.c:258)
==13874==    by 0x4B6EFDE: UnknownInlinedFun (gstcaps.c:1566)
==13874==    by 0x4B6EFDE: gst_caps_intersect_full (gstcaps.c:1723)
==13874==    by 0x4B1548A: gst_pad_proxy_query_caps (gstutils.c:2818)
==13874==    by 0x4B45AD4: UnknownInlinedFun (gstpad.c:3187)
==13874==    by 0x4B45AD4: gst_pad_query_default (gstpad.c:3415)
==13874==    by 0x4B44B59: gst_pad_query (gstpad.c:4071)
==13874==    by 0x4B4522D: gst_pad_peer_query (gstpad.c:4203)
==13874==    by 0x4B4A47B: gst_pad_get_allowed_caps (gstpad.c:2823)
==13874==    by 0x5F574BD: gst_rtp_opus_pay_setcaps (gstrtpopuspay.c:111)
Edited by Knut Andre Tidemann

Merge request reports