Fixed a memory leak issue.
Signed-off-by: Zhou Chang <achang.zhou@gmail.com>