]> www.infradead.org Git - users/hch/misc.git/commit
af_unix: Clean up error paths in unix_stream_sendmsg().
authorKuniyuki Iwashima <kuniyu@amazon.com>
Fri, 13 Dec 2024 11:08:42 +0000 (20:08 +0900)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 17 Dec 2024 11:08:27 +0000 (12:08 +0100)
commitd460b04bc452cf15810b79c15381fffd9d201915
tree7a7eca7aa1c855fb2e6f07b76591988948dbfe6e
parent6c444255b193b5b9c5a18c3784d960e10e1833a2
af_unix: Clean up error paths in unix_stream_sendmsg().

If we move send_sig() to the SEND_SHUTDOWN check before
the while loop, then we can reuse the same kfree_skb()
after the pipe_err_free label.

Let's gather the scattered kfree_skb()s in error paths.

While at it, some style issues are fixed, and the pipe_err_free
label is renamed to out_pipe to match other label names.

Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
net/unix/af_unix.c