util/demuxer: Fix the memory leak