]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Only increment counter if error is populated
authorNick Porter <nick@portercomputing.co.uk>
Fri, 4 Oct 2024 15:20:58 +0000 (16:20 +0100)
committerNick Porter <nick@portercomputing.co.uk>
Fri, 4 Oct 2024 15:20:58 +0000 (16:20 +0100)
src/modules/rlm_sql/drivers/rlm_sql_mysql/rlm_sql_mysql.c

index a205143d4cdf6eb052ff7535564bdbb716e9001d..2d4b3403ff90c18eaacfa4bc812e01ad9b1cb898 100644 (file)
@@ -744,8 +744,8 @@ static size_t sql_error(TALLOC_CTX *ctx, sql_log_entry_t out[], size_t outlen,
        if (error) {
                out[i].type = L_ERR;
                out[i].msg = error;
+               i++;
        }
-       i++;
 
        return i;
 }