Skip to content

Commit 60a51c6

Browse files
committed
Fix incorrect placement of pfree() in pg_relation_check_pages()
This would cause the function to crash when more than one page is considered as broken and reported in the SRF. Reported-by: Noriyoshi Shinoda Discussion: https://postgr.es/m/TU4PR8401MB11523D42C315AAF822E74275EE170@TU4PR8401MB1152.NAMPRD84.PROD.OUTLOOK.COM
1 parent b787d4c commit 60a51c6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/backend/utils/adt/pagefuncs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,10 +220,10 @@ check_relation_fork(TupleDesc tupdesc, Tuplestorestate *tupstore,
220220

221221
/* Save the corrupted blocks in the tuplestore. */
222222
tuplestore_putvalues(tupstore, tupdesc, values, nulls);
223-
224-
pfree(path);
225223
}
226224

225+
pfree(path);
226+
227227
/* Pop the error context stack */
228228
error_context_stack = errcallback.previous;
229229
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy