From: Nick Porter Date: Thu, 4 Sep 2025 12:44:39 +0000 (+0100) Subject: Make sure the randle is released if enqueue fails X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fcb8c2c747cea18c23802288e34c7794e1f303c7;p=thirdparty%2Ffreeradius-server.git Make sure the randle is released if enqueue fails --- diff --git a/src/modules/rlm_smtp/rlm_smtp.c b/src/modules/rlm_smtp/rlm_smtp.c index 5c845df1b6..bfe35285e2 100644 --- a/src/modules/rlm_smtp/rlm_smtp.c +++ b/src/modules/rlm_smtp/rlm_smtp.c @@ -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); }