mirror of
https://github.com/postgres/postgres.git
synced 2025-08-27 07:42:10 +03:00
Fix uninitialized memory bug
Have interested callers of find_inheritance_children set the detached_exist value to false prior to calling it, so that that routine only has to set it true in the rare cases where it is necessary. Don't touch it otherwise. Per buildfarm member thorntail (which reported a UBSan failure here).
This commit is contained in:
@@ -131,6 +131,7 @@ RelationBuildPartitionDesc(Relation rel, bool omit_detached)
|
||||
* concurrently, whatever this function returns will be accurate as of
|
||||
* some well-defined point in time.
|
||||
*/
|
||||
detached_exist = false;
|
||||
inhoids = find_inheritance_children(RelationGetRelid(rel), omit_detached,
|
||||
NoLock, &detached_exist);
|
||||
nparts = list_length(inhoids);
|
||||
|
Reference in New Issue
Block a user