mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-27 15:45:54 +00:00
init ssl connection: return quickly if link is null
Under error: 'link' fields are being accessed, so it's wrong to goto error with link == NULL. Instead, return immediately. Found by coverity. Signed-off-by: Uri Lublin <uril@redhat.com> Acked-by: Pavel Grunt <pgrunt@redhat.com>
This commit is contained in:
parent
94725f1ca8
commit
8e593b55cf
@ -2461,8 +2461,9 @@ static RedLinkInfo *reds_init_client_ssl_connection(RedsState *reds, int socket)
|
||||
int ssl_status;
|
||||
|
||||
link = reds_init_client_connection(reds, socket);
|
||||
if (link == NULL)
|
||||
goto error;
|
||||
if (link == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
|
||||
ssl_status = reds_stream_enable_ssl(link->stream, reds->ctx);
|
||||
switch (ssl_status) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user