Duplicate the hostname after if (...) goto err instead of before that check.
This was found by inspecting get_new_client() callers. It is not clear to me
why Coverity did not complain about this function.
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
client = get_new_client();
- client->hostname = strdup(hostname);
-
if (type == Fio_client_socket)
client->is_sock = true;
else {
client->ops = ops;
client->refs = 1;
client->type = ops->client_type;
+ client->hostname = strdup(hostname);
__fio_client_add_cmd_option(client, "fio");