The branch main has been updated by markj:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=ce5692bf009ed5607d3b880eec4055697479c13d

commit ce5692bf009ed5607d3b880eec4055697479c13d
Author:     Mark Johnston <[email protected]>
AuthorDate: 2025-11-13 22:57:35 +0000
Commit:     Mark Johnston <[email protected]>
CommitDate: 2025-11-14 00:43:38 +0000

    unix: Remove an always-false null pointer check
    
    No functional change intended.
    
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D53453
---
 sys/kern/uipc_usrreq.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c
index 8c9fa4c012e4..86e1694fb869 100644
--- a/sys/kern/uipc_usrreq.c
+++ b/sys/kern/uipc_usrreq.c
@@ -3216,11 +3216,9 @@ unp_disconnect(struct unpcb *unp, struct unpcb *unp2)
 #endif
                LIST_REMOVE(unp, unp_reflink);
                UNP_REF_LIST_UNLOCK();
-               if (so) {
-                       SOCK_LOCK(so);
-                       so->so_state &= ~SS_ISCONNECTED;
-                       SOCK_UNLOCK(so);
-               }
+               SOCK_LOCK(so);
+               so->so_state &= ~SS_ISCONNECTED;
+               SOCK_UNLOCK(so);
                break;
 
        case SOCK_STREAM:

Reply via email to