From: Vakul Garg <vakul.g...@nxp.com>
Date: Fri, 21 Dec 2018 15:16:52 +0000

> @@ -943,10 +943,12 @@ int tls_sw_sendmsg(struct sock *sk, struct msghdr *msg, 
> size_t size)
>                                   tls_ctx->tx.overhead_size);
>               }
>  
> -             ret = sk_msg_memcopy_from_iter(sk, &msg->msg_iter, msg_pl,
> -                                            try_to_copy);
> -             if (ret < 0)
> -                     goto trim_sgl;
> +             if (try_to_copy) {
> +                     ret = sk_msg_memcopy_from_iter(sk, &msg->msg_iter,
> +                                                    msg_pl, try_to_copy);
> +                     if (ret < 0)
> +                             goto trim_sgl;
> +             }

This leaves 'ret' uninitialized, and the code below here uses it's
value.

Reply via email to