Skip to content

Commit bd905a0

Browse files
committed
Fix possible NULL dereference in ExecAlterObjectDependsStmt
I used the wrong variable here. Doesn't make a difference today because the only plausible caller passes a non-NULL variable, but someday it will be wrong, and even today's correctness is subtle: the caller that does pass a NULL is never invoked because of object type constraints. Surely not a condition to rely on. Noted by Coverity
1 parent 660d5fb commit bd905a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/backend/commands/alter.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ ExecAlterObjectDependsStmt(AlterObjectDependsStmt *stmt, ObjectAddress *refAddre
422422
if (refAddress)
423423
*refAddress = refAddr;
424424

425-
recordDependencyOn(&address, refAddress, DEPENDENCY_AUTO_EXTENSION);
425+
recordDependencyOn(&address, &refAddr, DEPENDENCY_AUTO_EXTENSION);
426426

427427
return address;
428428
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy