Commit 7f9de540 authored by Bruce Momjian's avatar Bruce Momjian

Fix GSS API pointer checking.

Kris Jurka
parent 12afe7bc
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $PostgreSQL: pgsql/src/backend/libpq/auth.c,v 1.155 2007/07/24 09:00:27 mha Exp $ * $PostgreSQL: pgsql/src/backend/libpq/auth.c,v 1.156 2007/09/14 15:58:02 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -493,7 +493,7 @@ pg_GSS_recvauth(Port *port) ...@@ -493,7 +493,7 @@ pg_GSS_recvauth(Port *port)
/* /*
* Release service principal credentials * Release service principal credentials
*/ */
gss_release_cred(&min_stat, port->gss->cred); gss_release_cred(&min_stat, &port->gss->cred);
} }
/* /*
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group * Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $PostgreSQL: pgsql/src/backend/libpq/pqcomm.c,v 1.195 2007/07/24 11:16:36 mha Exp $ * $PostgreSQL: pgsql/src/backend/libpq/pqcomm.c,v 1.196 2007/09/14 15:58:02 momjian Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -178,11 +178,11 @@ pq_close(int code, Datum arg) ...@@ -178,11 +178,11 @@ pq_close(int code, Datum arg)
OM_uint32 min_s; OM_uint32 min_s;
/* Shutdown GSSAPI layer */ /* Shutdown GSSAPI layer */
if (MyProcPort->gss->ctx) if (MyProcPort->gss->ctx != GSS_C_NO_CONTEXT)
gss_delete_sec_context(&min_s, MyProcPort->gss->ctx, NULL); gss_delete_sec_context(&min_s, &MyProcPort->gss->ctx, NULL);
if (MyProcPort->gss->cred) if (MyProcPort->gss->cred != GSS_C_NO_CREDENTIAL)
gss_release_cred(&min_s, MyProcPort->gss->cred); gss_release_cred(&min_s, &MyProcPort->gss->cred);
#endif /* ENABLE_GSS */ #endif /* ENABLE_GSS */
/* GSS and SSPI share the port->gss struct */ /* GSS and SSPI share the port->gss struct */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment