Re: [spice-server PATCH 3/3] init ssl connection: return quickly if link is null

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <uril@xxxxxxxxxx>
Acked-by: Pavel Grunt <pgrunt@xxxxxxxxxx>
---
  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@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]