On 07/17/2017 11:17 AM, Frediano Ziglio wrote:

On Sun, 2017-07-16 at 18:47 +0300, Uri Lublin wrote:
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 <u...@redhat.com>
Acked-by: Pavel Grunt <pgr...@redhat.com>
---
  server/reds.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/reds.c b/server/reds.c
index f412a8486..46d33fb5f 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -2462,7 +2462,7 @@ static RedLinkInfo
*reds_init_client_ssl_connection(RedsState *reds, int socket)
link = reds_init_client_connection(reds, socket);
      if (link == NULL)
-        goto error;
+        return NULL;
ssl_status = reds_stream_enable_ssl(link->stream, reds->ctx);
      switch (ssl_status) {

Patch is fine. Could you update the style (brackets) ?

I did and pushed it.

Thanks,
    Uri.
_______________________________________________
Spice-devel mailing list
Spice-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/spice-devel

Reply via email to