Fix possible NULL dereference in ExecAlterObjectDependsStmt

Alvaro Herrera <alvherre@alvh.no-ip.org>

Commit: bd905a0d0416628b4aef153463c1f5e5b80b3e96
Author: Alvaro Herrera <alvherre@alvh.no-ip.org>
Date: 2016-04-10T14:03:35Z
Releases: 9.6.0
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

Files

PathChange+/−
src/backend/commands/alter.c modified +1 −1