You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test: test_rtmp_send_batch leaks the RTMP channel packets (LeakSanitizer, valgrind) #3401
test_rtmp_send_batch (#3375) leaks what RTMP_SendPacket() keeps per channel, once in each of its 4 cases:
Direct leak of 128 byte(s) in 1 object(s) allocated from:
#0 realloc
#1 RTMP_SendPacket plugins/obs-outputs/librtmp/rtmp.c:4121
#2 send_one test/cmocka/test_rtmp_send_batch.c:52
and 48 bytes indirect from rtmp.c:4339. The asan job reports it (run 41287610997) and valgrind does too (exit 99, 4 × 176 bytes definitely lost). Tier 2 passes, as it does not check for leaks.
OBS itself does not leak: RTMP_Close() frees m_vecChannelsOut, and rtmp-stream calls it whenever it disconnects (rtmp-stream.c.h). The test calls only RTMP_Free(), which frees the struct and its TLS state, not the channels.
What to do
Call RTMP_Close() before RTMP_Free() in send_one(). With the socket already set to -1 it sends nothing. No assertion changes.
Once #3290 lands, the asan job fails on a sanitizer report, so this must be fixed first.
Activity
vpacher commentedon Nov 1, 2026
/ready
vpacher commentedon Nov 1, 2026
Claiming: close the RTMP connection in test_rtmp_send_batch
Plan (one PR): call
RTMP_Close()beforeRTMP_Free()insend_one(); valgrind evidence before and after. PR within the hour.fix(test): close the RTMP connection in test_rtmp_send_batch (obs-rus…