[deamon] memory leaks
Issue generated from Tuleap's migration script. Originally submitted by: Guillaume Roguez (guillaume)
dring build with ASAN shows many memory leaks, specially when video call is used (ex: non-free allocations made by av\_malloc and av\_dict\_set, one in pulseaudio pa\_xmalloc).
Sample of ASAN output
================================================================= ==17695==ERROR: LeakSanitizer: detected memory leaks Direct leak of 10448 byte(s) in 17 object(s) allocated from: \#0 0x7f1c14ea73b6 in posix\_memalign (/lib64/libasan.so.2+0x993b6) \#1 0x7f1c1110e18f in av\_malloc (/lib64/libavutil.so.54+0x1d18f) Direct leak of 176 byte(s) in 2 object(s) allocated from: \#0 0x7f1c14ea696a in malloc (/lib64/libasan.so.2+0x9896a) \#1 0x7f1c1407f6e6 in pa\_xmalloc (/lib64/libpulse.so.0+0x396e6) Indirect leak of 8608 byte(s) in 24 object(s) allocated from: \#0 0x7f1c14ea73b6 in posix\_memalign (/lib64/libasan.so.2+0x993b6) \#1 0x7f1c1110e18f in av\_malloc (/lib64/libavutil.so.54+0x1d18f) Indirect leak of 528 byte(s) in 13 object(s) allocated from: \#0 0x7f1c14ea6cea in realloc (/lib64/libasan.so.2+0x98cea) \#1 0x7f1c11104e64 in av\_dict\_set (/lib64/libavutil.so.54+0x13e64) Indirect leak of 472 byte(s) in 70 object(s) allocated from: \#0 0x7f1c14ea6cea in realloc (/lib64/libasan.so.2+0x98cea) \#1 0x7f1c1110e3d0 in av\_strdup (/lib64/libavutil.so.54+0x1d3d0) Indirect leak of 32 byte(s) in 4 object(s) allocated from: \#0 0x7f1c14ea6cea in realloc (/lib64/libasan.so.2+0x98cea) \#1 0x7f1c11932668 in avformat\_new\_stream (/lib64/libavformat.so.56+0x13a668)