Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 361eaa1

Browse files
committed
Prevent core dump from calling Tcl_DontCallWhenDeleted() with a null
interp pointer. Per report from Gerhard Hintermayer.
1 parent 032235c commit 361eaa1

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/interfaces/libpgtcl/pgtclId.c

+4-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* Portions Copyright (c) 1994, Regents of the University of California
1414
*
1515
* IDENTIFICATION
16-
* $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtclId.c,v 1.39 2003/02/01 00:07:03 tgl Exp $
16+
* $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtclId.c,v 1.40 2003/02/01 00:22:12 tgl Exp $
1717
*
1818
*-------------------------------------------------------------------------
1919
*/
@@ -274,8 +274,9 @@ PgDelConnectionId(DRIVER_DEL_PROTO)
274274
Tcl_DeleteHashTable(&notifies->notify_hash);
275275
if (notifies->conn_loss_cmd)
276276
ckfree((void *) notifies->conn_loss_cmd);
277-
Tcl_DontCallWhenDeleted(notifies->interp, PgNotifyInterpDelete,
278-
(ClientData) notifies);
277+
if (notifies->interp)
278+
Tcl_DontCallWhenDeleted(notifies->interp, PgNotifyInterpDelete,
279+
(ClientData) notifies);
279280
ckfree((void *) notifies);
280281
}
281282

0 commit comments

Comments
 (0)