]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Ensure we print the log entry with either error or fmt populated
authorNick Porter <nick@portercomputing.co.uk>
Fri, 25 Aug 2023 13:52:34 +0000 (14:52 +0100)
committerNick Porter <nick@portercomputing.co.uk>
Tue, 29 Aug 2023 10:19:44 +0000 (11:19 +0100)
src/lib/util/log.c

index 21918d48af211540389fce4c10a8822d14b8de65..3b5a33914b6a290ecb5bfabf1d57b3482a9fae9a 100644 (file)
@@ -682,9 +682,10 @@ void fr_vlog_perror(fr_log_t const *log, fr_log_type_t type, char const *file, i
                }
                /* coverity[check_return] */
                fr_sbuff_in_strcpy(&sbuff, error);
-               error = fr_sbuff_start(&sbuff);         /* may not be talloced with const */
        }
 
+       error = fr_sbuff_start(&sbuff);         /* may not be talloced with const */
+
        /*
         *      Log the first line
         */