Re: reallocing without oom check in pg_regress

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: Daniel Gustafsson <daniel@yesql.se>
Cc: PostgreSQL Developers <pgsql-hackers@lists.postgresql.org>
Date: 2022-02-23T22:05:15Z
Lists: pgsql-hackers
Daniel Gustafsson <daniel@yesql.se> writes:
> 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 a
> reason not to use pg_realloc() there for hygiene?

Yeah, looks like oversight to me.

			regards, tom lane



Commits

  1. Guard against reallocation failure in pg_regress