In pg_regress we realloc() with the destination and source pointer being equal,without checking for OOM. While a fairly unlikely source of errors, is there areason not to use pg_realloc() there for hygiene?
--Daniel Gustafsson https://vmware.com/