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-Url: http://git.postgresql.org/gitweb/static/gitweb.js?a=commitdiff_plain;h=f19c4181a59ef03f887c9e7a409606bdb2ef5f0b;p=users%2Fbernd%2Fpostgres.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 bf9ed5fa46..b9766812fc 100644 --- a/src/interfaces/libpgtcl/pgtclId.c +++ b/src/interfaces/libpgtcl/pgtclId.c @@ -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); }