uri: fix leak in hostname parsing.