]> www.infradead.org Git - users/jedix/linux-maple.git/commit
af_unix: Clean up error paths in unix_dgram_sendmsg().
authorKuniyuki Iwashima <kuniyu@amazon.com>
Fri, 13 Dec 2024 11:08:49 +0000 (20:08 +0900)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 17 Dec 2024 11:08:28 +0000 (12:08 +0100)
commit62c6db251e667e8a240dc8209c00313240120fd6
tree61df709ebd4a189c0182c2494cffeab2bd9e6021
parent106d979b85e575b0ab10224fcde5c3eb94566e05
af_unix: Clean up error paths in unix_dgram_sendmsg().

The error path is complicated in unix_dgram_sendmsg() because there
are two timings when other could be non-NULL: when it's fetched from
unix_peer_get() and when it's looked up by unix_find_other().

Let's move unix_peer_get() to the else branch for unix_find_other()
and clean up the error paths.

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