]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Make sure the randle is released if enqueue fails
authorNick Porter <nick@portercomputing.co.uk>
Thu, 4 Sep 2025 12:44:39 +0000 (13:44 +0100)
committerNick Porter <nick@portercomputing.co.uk>
Thu, 4 Sep 2025 14:32:37 +0000 (15:32 +0100)
src/modules/rlm_smtp/rlm_smtp.c

index 5c845df1b6706f6b71b1bfeea737ca5c31bf5f89..bfe35285e20cc6da30703e4c7cd7a535085b31ab 100644 (file)
@@ -729,10 +729,10 @@ skip_auth:
                RDEBUG2("No files were attached to the email");
        }
 
-       /* Add the mime endoced elements to the curl request */
+       /* Add the mime encoded elements to the curl request */
        FR_CURL_REQUEST_SET_OPTION(CURLOPT_MIMEPOST, mail_ctx->mime);
 
-       if (fr_curl_io_request_enqueue(t->mhandle, request, randle)) RETURN_UNLANG_INVALID;
+       if (fr_curl_io_request_enqueue(t->mhandle, request, randle)) goto error;
 
        return unlang_module_yield(request, smtp_io_module_resume, smtp_io_module_signal, ~FR_SIGNAL_CANCEL, randle);
 }