Rearrange the code to avoid a memory leak as suggested by coverity.
Rearrange the code to avoid a memory leak as suggested by coverity.

zzxuanyuan/root-compressor-dummy,zzxuanyuan/root-compressor-dummy,zzxuanyuan/root-compressor-dummy,zzxuanyuan/root-compressor-dummy,zzxuanyuan/root-compressor-dummy,zzxuanyuan/root-compressor-dummy,zzxuanyuan/root-compressor-dummy,zzxuanyuan/root-compressor-dummy,zzxuanyuan/root-compressor-dummy,zzxuanyuan/root-compressor-dummy,zzxuanyuan/root-compressor-dummy