pgpool2.git / summary / log / commit / refs

commit    aefe34a3f4d8676301d8fe8355dc538c93a4e540
Author:   Tatsuo Ishii <ishii@postgresql.org>
Date:     Wed Jan 07 02:08:59 2026 +0000

    Fix new defects pointed out by Coverity.
    
    This commit fixes two defects pointed out by Coverity.
    
    - CID 1643994: Integer handling issues  (OVERFLOW_BEFORE_WIDEN)
    - CID 1643995: Null pointer dereferences  (REVERSE_INULL)
    
    These were introduced by 53844460f.


src/streaming_replication/pool_worker_child.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/streaming_replication/pool_worker_child.c b/src/streaming_replication/pool_worker_child.c index 7026f0b1f..ee4796437 100644 --- a/src/streaming_replication/pool_worker_child.c +++ b/src/streaming_replication/pool_worker_child.c @@ -1032,10 +1032,11 @@ check_replication_time_lag_with_cmd(void) bkinfo->standby_delay = delay; bkinfo->standby_delay_by_time = true; - /* Log delay if necessary */ - delay_threshold_by_time = pool_config->delay_threshold_by_time * 1000; /* threshold is in - * milliseconds, convert - * to microseconds */ + /* + * Log delay if necessary. threshold is in milliseconds, convert + * to microseconds. + */ + delay_threshold_by_time = pool_config->delay_threshold_by_time * 1000LL; if ((pool_config->log_standby_delay == LSD_ALWAYS && delay_ms > 0) || (pool_config->log_standby_delay == LSD_OVER_THRESHOLD && @@ -1073,8 +1074,7 @@ check_replication_time_lag_with_cmd(void) PG_END_TRY(); /* Normal cleanup */ - if (line) - pfree(line); + pfree(line); error_context_stack = callback.previous; } [parent: a350afd70047]