pgsql: Fix possible NULL dereference in ExecAlterObjectDependsStmt

From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix possible NULL dereference in ExecAlterObjectDependsStmt
Date: 2016-04-10 14:06:03
Message-ID: E1apG03-00044b-Ta@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/bd905a0d0416628b4aef153463c1f5e5b80b3e96

Modified Files
--------------
src/backend/commands/alter.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2016-04-10 15:06:42 Re: pgsql: Add the "snapshot too old" feature
Previous Message Alexander Korotkov 2016-04-10 06:08:30 Re: [COMMITTERS] pgsql: Bloom index contrib module