[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CADvbK_edAKXgrQUgcPMxkVFADOnPuyU3+Dzumi_3MubYoHvvRg@mail.gmail.com>
Date: Wed, 19 Oct 2022 17:26:48 -0400
From: Xin Long <lucien.xin@...il.com>
To: Alexey Kodanev <aleksei.kodanev@...l-sw.com>
Cc: linux-sctp@...r.kernel.org, netdev@...r.kernel.org
Subject: Re: [PATCH net-next 2/3] sctp: remove unnecessary NULL check in sctp_ulpq_tail_event()
On Wed, Oct 19, 2022 at 2:33 PM Alexey Kodanev
<aleksei.kodanev@...l-sw.com> wrote:
>
> After commit 013b96ec6461 ("sctp: Pass sk_buff_head explicitly to
> sctp_ulpq_tail_event().") there is one more unneeded check of
> skb_list for NULL.
>
> Detected using the static analysis tool - Svace.
> Signed-off-by: Alexey Kodanev <aleksei.kodanev@...l-sw.com>
> ---
> net/sctp/ulpqueue.c | 5 +----
> 1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/net/sctp/ulpqueue.c b/net/sctp/ulpqueue.c
> index 24960dcb6a21..b05daafd369a 100644
> --- a/net/sctp/ulpqueue.c
> +++ b/net/sctp/ulpqueue.c
> @@ -256,10 +256,7 @@ int sctp_ulpq_tail_event(struct sctp_ulpq *ulpq, struct sk_buff_head *skb_list)
> return 1;
>
> out_free:
> - if (skb_list)
> - sctp_queue_purge_ulpevents(skb_list);
> - else
> - sctp_ulpevent_free(event);
> + sctp_queue_purge_ulpevents(skb_list);
>
> return 0;
> }
> --
> 2.25.1
>
Reviewed-by: Xin Long <lucien.xin@...il.com>
Powered by blists - more mailing lists