fix crash bug

program crashes when writes data to redis
Merge pull request #4 from phoenixluo/master

修改了向 redis 写入数据时程序崩溃的问题