fixed memleak when publishing to live-stream