Fix GSS API pointer checking.

Kris Jurka
This commit is contained in:
Bruce Momjian 2007-09-14 15:58:02 +00:00
parent 12afe7bc76
commit 7f9de5407a
2 changed files with 7 additions and 7 deletions

View File

@ -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)
/* /*
* Release service principal credentials * Release service principal credentials
*/ */
gss_release_cred(&min_stat, port->gss->cred); gss_release_cred(&min_stat, &port->gss->cred);
} }
/* /*

View File

@ -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)
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 */