]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
rlm_logtee: log.dst not restored on expand failure
authorAlexander Bainbridge-Sedivy <alex.bainbridge@inkbridge.io>
Wed, 20 May 2026 18:02:12 +0000 (14:02 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Thu, 28 May 2026 19:50:00 +0000 (15:50 -0400)
src/modules/rlm_logtee/rlm_logtee.c

index e1999f51cc54300930f725840775995463493be8..f796e080948d296be8a5fa96ddc9a5fe422c76d2 100644 (file)
@@ -484,7 +484,10 @@ static void logtee_it(fr_log_type_t type, fr_log_lvl_t lvl, request_t *request,
         */
        dst = request->log.dst;
        request->log.dst = NULL;
-       if (tmpl_aexpand(t, &exp, request, inst->log_fmt, NULL, NULL) < 0) goto finish;
+       if (tmpl_aexpand(t, &exp, request, inst->log_fmt, NULL, NULL) < 0) {
+               request->log.dst = dst;
+               goto finish;
+       }
        request->log.dst = dst;
 
        fr_fring_overwrite(t->fring, exp);      /* Insert it into the buffer */