Add error check in redisContextInit

Check whether the obuf or reader is empty: if one of the items is empty,
free the redisContext.