increase resphdr size and fix memory leakage while completed

The original resphdr size is too small to hold the new response header due to 'interleaved=0-1' is added. Also, I fixed the memory leakage while completed.