Skip to content

input: source: properly release on `SlaveAdd` failure

Alaric Senat requested to merge asenat/vlc:fix/input-slave-init-leak into master

Fix a leak happening when an input slave fails to load. Leak detected with asan:

Direct leak of 120 byte(s) in 1 object(s) allocated from:
    #0 0x7f56cb985ad7 in calloc (/lib64/libasan.so.6)
    #1 0x7f56cad22849 in InputSourceNew src/input/input.c:2605
    #2 0x7f56cad2c9ca in input_SlaveSourceAdd src/input/input.c:3408
    #3 0x7f56cad0f838 in LoadSlaves src/input/input.c:1164
    #4 0x7f56cad1219a in Init src/input/input.c:1360
    #5 0x7f56cad06092 in Run src/input/input.c:466
    #6 0x7f56c9998b19 in start_thread (/lib64/libc.so.6)

Merge request reports

Loading