Don't leak memory if an invalid type is set (#906)
Don't leak memory if an invalid type is set (#906)

Co-authored-by: James Rouzier <9fc2f41cad573da7ccdf43d1a7b4a141b619bf4f@inverse.ca>
redis/hiredis,redis/hiredis,redis/hiredis