webclient: Fix a use of uninitialized variable

Detected by clang static analyzer.
This commit is contained in:
YAMAMOTO Takashi 2021-01-20 10:03:59 +09:00 committed by Xiang Xiao
parent e800609e7b
commit 412cf2b955

View File

@ -777,8 +777,8 @@ int webclient_perform(FAR struct webclient_context *ctx)
/* Could not resolve host (or malformed IP address) */
nwarn("WARNING: Failed to resolve hostname\n");
ret = -EHOSTUNREACH;
goto errout_with_errno;
free(ws);
return -EHOSTUNREACH;
}
server_address = (const struct sockaddr *)&server_in;