From: Tom Lane Date: Sat, 1 Feb 2003 00:22:23 +0000 (+0000) Subject: Prevent core dump from calling Tcl_DontCallWhenDeleted() with a null X-Git-Tag: REL7_3_2~8 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3be050da324a9329f195bfdc13dc7b8b221a72dc;p=thirdparty%2Fpostgresql.git Prevent core dump from calling Tcl_DontCallWhenDeleted() with a null interp pointer. Per report from Gerhard Hintermayer. --- diff --git a/src/interfaces/libpgtcl/pgtclId.c b/src/interfaces/libpgtcl/pgtclId.c index 56fd72754f9..4d19886a311 100644 --- a/src/interfaces/libpgtcl/pgtclId.c +++ b/src/interfaces/libpgtcl/pgtclId.c @@ -13,7 +13,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtclId.c,v 1.37.2.1 2003/02/01 00:07:19 tgl Exp $ + * $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtclId.c,v 1.37.2.2 2003/02/01 00:22:23 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -273,8 +273,9 @@ PgDelConnectionId(DRIVER_DEL_PROTO) Tcl_DeleteHashTable(¬ifies->notify_hash); if (notifies->conn_loss_cmd) ckfree((void *) notifies->conn_loss_cmd); - Tcl_DontCallWhenDeleted(notifies->interp, PgNotifyInterpDelete, - (ClientData) notifies); + if (notifies->interp) + Tcl_DontCallWhenDeleted(notifies->interp, PgNotifyInterpDelete, + (ClientData) notifies); ckfree((void *) notifies); }