]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Use a single error label
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 3 Aug 2026 17:55:13 +0000 (11:55 -0600)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Mon, 3 Aug 2026 19:18:08 +0000 (13:18 -0600)
src/lib/tls/virtual_server.c

index 59fe54ef327e4d4f2c58cc710084983d7831e9ae..0fe1fa339b5b22a82a70acbe1044296de5102345 100644 (file)
@@ -67,6 +67,7 @@ unlang_action_t fr_tls_call_push(request_t *child, unlang_function_no_result_t r
        if (unlang_subrequest_child_push(NULL, child,
                                         tls_session,
                                         true, UNLANG_SUB_FRAME) < 0) {
+       error:
                request_detach(child);
                return UNLANG_ACTION_FAIL;
        }
@@ -80,10 +81,7 @@ unlang_action_t fr_tls_call_push(request_t *child, unlang_function_no_result_t r
                                 resume,
                                 NULL,
                                 0, UNLANG_SUB_FRAME,
-                                tls_session) < 0) {
-               request_detach(child);
-               return UNLANG_ACTION_FAIL;
-       }
+                                tls_session) < 0) goto error;
 
        /*
         *      Now the child and parent stacks are both
@@ -91,10 +89,7 @@ unlang_action_t fr_tls_call_push(request_t *child, unlang_function_no_result_t r
         *      call into the subrequest to run the section
         *      specified by Packet-Type.
         */
-       if (unlang_call_push(NULL, child, conf->virtual_server, UNLANG_SUB_FRAME) < 0) {
-               request_detach(child);
-               return UNLANG_ACTION_FAIL;
-       }
+       if (unlang_call_push(NULL, child, conf->virtual_server, UNLANG_SUB_FRAME) < 0) goto error;
 
        return UNLANG_ACTION_PUSHED_CHILD;
 }