Skip to content

Commit 7f9de54

Browse files
committed
Fix GSS API pointer checking.
Kris Jurka
1 parent 12afe7b commit 7f9de54

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/backend/libpq/auth.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/libpq/auth.c,v 1.155 2007/07/24 09:00:27 mha Exp $
11+
* $PostgreSQL: pgsql/src/backend/libpq/auth.c,v 1.156 2007/09/14 15:58:02 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -493,7 +493,7 @@ pg_GSS_recvauth(Port *port)
493493
/*
494494
* Release service principal credentials
495495
*/
496-
gss_release_cred(&min_stat, port->gss->cred);
496+
gss_release_cred(&min_stat, &port->gss->cred);
497497
}
498498

499499
/*

src/backend/libpq/pqcomm.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
* Portions Copyright (c) 1996-2007, PostgreSQL Global Development Group
3131
* Portions Copyright (c) 1994, Regents of the University of California
3232
*
33-
* $PostgreSQL: pgsql/src/backend/libpq/pqcomm.c,v 1.195 2007/07/24 11:16:36 mha Exp $
33+
* $PostgreSQL: pgsql/src/backend/libpq/pqcomm.c,v 1.196 2007/09/14 15:58:02 momjian Exp $
3434
*
3535
*-------------------------------------------------------------------------
3636
*/
@@ -178,11 +178,11 @@ pq_close(int code, Datum arg)
178178
OM_uint32 min_s;
179179

180180
/* Shutdown GSSAPI layer */
181-
if (MyProcPort->gss->ctx)
182-
gss_delete_sec_context(&min_s, MyProcPort->gss->ctx, NULL);
181+
if (MyProcPort->gss->ctx != GSS_C_NO_CONTEXT)
182+
gss_delete_sec_context(&min_s, &MyProcPort->gss->ctx, NULL);
183183

184-
if (MyProcPort->gss->cred)
185-
gss_release_cred(&min_s, MyProcPort->gss->cred);
184+
if (MyProcPort->gss->cred != GSS_C_NO_CREDENTIAL)
185+
gss_release_cred(&min_s, &MyProcPort->gss->cred);
186186
#endif /* ENABLE_GSS */
187187
/* GSS and SSPI share the port->gss struct */
188188

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