Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7f9de54

Browse files
committed
Fix GSS API pointer checking.
Kris Jurka
1 parent12afe7b commit7f9de54

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_uint32min_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)

[8]ページ先頭

©2009-2025 Movatter.jp