From: Thomas Munro Date: Fri, 17 Mar 2023 01:44:12 +0000 (+1300) Subject: Small tidyup for commit d41a178b, part II. X-Git-Tag: REL_15_3~74 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e8a774d00779af85863d2f798e6256ef7fb59e23;p=thirdparty%2Fpostgresql.git Small tidyup for commit d41a178b, part II. Further to commit 6a9229da, checking for NULL is now redundant. An "out of memory" error would have been thrown already by palloc() and treated as FATAL, so we can delete a few more lines. Back-patch to all releases, like those other commits. Reported-by: Tom Lane Discussion: https://postgr.es/m/4040668.1679013388%40sss.pgh.pa.us --- diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c index d4769765742..892d42c63ee 100644 --- a/src/backend/postmaster/postmaster.c +++ b/src/backend/postmaster/postmaster.c @@ -4840,11 +4840,6 @@ retry: * freed by a later call to waitpid(). */ childinfo = palloc(sizeof(win32_deadchild_waitinfo)); - if (!childinfo) - ereport(FATAL, - (errcode(ERRCODE_OUT_OF_MEMORY), - errmsg("out of memory"))); - childinfo->procHandle = pi.hProcess; childinfo->procId = pi.dwProcessId;