git: b30b7a140c52 - main - sctp: cleanup, no functional change

From: Michael Tuexen <tuexen_at_FreeBSD.org>
Date: Sat, 02 Apr 2022 21:02:58 UTC
The branch main has been updated by tuexen:

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

commit b30b7a140c527c023f97083c256715ea86d4b6f4
Author:     Michael Tuexen <tuexen@FreeBSD.org>
AuthorDate: 2022-04-02 21:02:16 +0000
Commit:     Michael Tuexen <tuexen@FreeBSD.org>
CommitDate: 2022-04-02 21:02:16 +0000

    sctp: cleanup, no functional change
    
    MFC after:      3 days
---
 sys/netinet/sctp_output.c | 26 ++++++++++----------------
 1 file changed, 10 insertions(+), 16 deletions(-)

diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c
index 4ef771b0cc1a..d1386eb767aa 100644
--- a/sys/netinet/sctp_output.c
+++ b/sys/netinet/sctp_output.c
@@ -13360,21 +13360,7 @@ skip_preblock:
 						error = be.error;
 					}
 				}
-				if (error != 0) {
-					SOCKBUF_UNLOCK(&so->so_snd);
-					SCTP_TCB_LOCK(stcb);
-					hold_tcblock = true;
-					stcb->block_entry = NULL;
-					if (((asoc->state & SCTP_STATE_ABOUT_TO_BE_FREED) == 0) &&
-					    ((asoc->state & SCTP_STATE_WAS_ABORTED) == 0) &&
-					    (sp != NULL)) {
-						sp->processing = 0;
-					}
-					goto out_unlocked;
-				}
-			}
-			SOCKBUF_UNLOCK(&so->so_snd);
-			if (!hold_tcblock) {
+				SOCKBUF_UNLOCK(&so->so_snd);
 				SCTP_TCB_LOCK(stcb);
 				hold_tcblock = true;
 				stcb->block_entry = NULL;
@@ -13390,8 +13376,16 @@ skip_preblock:
 					} else {
 						error = ENOTCONN;
 					}
-					goto out;
+					goto out_unlocked;
+				}
+				if (error != 0) {
+					if (sp != NULL) {
+						sp->processing = 0;
+					}
+					goto out_unlocked;
 				}
+			} else {
+				SOCKBUF_UNLOCK(&so->so_snd);
 			}
 			if (SCTP_BASE_SYSCTL(sctp_logging_level) & SCTP_BLK_LOGGING_ENABLE) {
 				sctp_log_block(SCTP_BLOCK_LOG_OUTOF_BLK,