thorium: avoid memory leak in multiplexer

Signed-off-by: Sébastien Boisvert <boisvert@anl.gov>