http-client: Avoid NULL deref