Add empty pointer check in redisvFormatCommand

If firstly call "newargv = realloc(curargv,sizeof(char*)*(argc+1));"
failed, the curargv will be NULL. Freeing a NULL pointer is an undefined
behaviour in C, so add empty pointer check in this function.