projects
/
users
/
c2main
/
postgres.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b787d4c
)
Fix incorrect placement of pfree() in pg_relation_check_pages()
author
Michael Paquier
<
[email protected]
>
Thu, 29 Oct 2020 00:17:34 +0000
(09:17 +0900)
committer
Michael Paquier
<
[email protected]
>
Thu, 29 Oct 2020 00:17:34 +0000
(09:17 +0900)
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
src/backend/utils/adt/pagefuncs.c
patch
|
blob
|
blame
|
history
diff --git
a/src/backend/utils/adt/pagefuncs.c
b/src/backend/utils/adt/pagefuncs.c
index b6a23a2a4fa8eca6c1b06aba1fd55f356790b645..368ada515cf77d6ed603e9de414499663f868bcb 100644
(file)
--- a/
src/backend/utils/adt/pagefuncs.c
+++ b/
src/backend/utils/adt/pagefuncs.c
@@
-220,10
+220,10
@@
check_relation_fork(TupleDesc tupdesc, Tuplestorestate *tupstore,
/* Save the corrupted blocks in the tuplestore. */
tuplestore_putvalues(tupstore, tupdesc, values, nulls);
-
- pfree(path);
}
+ pfree(path);
+
/* Pop the error context stack */
error_context_stack = errcallback.previous;
}