File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 28
28
*
29
29
* Copyright (c) 1994, Regents of the University of California
30
30
*
31
- * $Id: pqcomm.c,v 1.80 1999/07/17 20:17:03 momjian Exp $
31
+ * $Id: pqcomm.c,v 1.81 1999/07/23 03:00:10 tgl Exp $
32
32
*
33
33
*-------------------------------------------------------------------------
34
34
*/
@@ -134,12 +134,16 @@ pq_getport(void)
134
134
135
135
/* --------------------------------
136
136
* pq_close - shutdown libpq at backend exit
137
+ *
138
+ * Note: in a standalone backend MyProcPort will be null,
139
+ * don't crash during exit...
137
140
* --------------------------------
138
141
*/
139
142
void
140
143
pq_close (void )
141
144
{
142
- close (MyProcPort -> sock );
145
+ if (MyProcPort != NULL )
146
+ close (MyProcPort -> sock );
143
147
}
144
148
145
149
You can’t perform that action at this time.
0 commit comments