diff options
Diffstat (limited to 'src/backend/replication/syncrep.c')
-rw-r--r-- | src/backend/replication/syncrep.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/backend/replication/syncrep.c b/src/backend/replication/syncrep.c index 79c7c13ada..a21f7d3347 100644 --- a/src/backend/replication/syncrep.c +++ b/src/backend/replication/syncrep.c @@ -865,8 +865,6 @@ SyncRepGetSyncStandbysPriority(bool *am_sync) */ if (list_length(result) + list_length(pending) <= SyncRepConfig->num_sync) { - bool needfree = (result != NIL && pending != NIL); - /* * Set *am_sync to true if this walsender is in the pending list * because all pending standbys are considered as sync. @@ -875,8 +873,7 @@ SyncRepGetSyncStandbysPriority(bool *am_sync) *am_sync = am_in_pending; result = list_concat(result, pending); - if (needfree) - pfree(pending); + list_free(pending); return result; } |