Silence Coverity complaint about possible null-pointer dereference.

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

Commit: 713cfaf2a576a9896fdd9b5aad51f6ebeb91a3c7
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2024-05-05T15:23:49Z
Releases: 17.0
Silence Coverity complaint about possible null-pointer dereference.

If pg_init_privs were to contain a NULL ACL field, this code would
pass old_acl == NULL to merge_acl_with_grant, which would crash.
The case shouldn't happen, but it just takes a couple more lines
of code to guard against it, so do so.

Oversight in 534287403; no back-patch needed.

Files

PathChange+/−
src/backend/catalog/aclchk.c modified +11 −8