Fix memory leak and compiler warning
Merge pull request #623 from pebble8888/shu_develop

Fix memory leak and compiler warning