From: foobar Date: Mon, 15 Dec 2003 01:14:54 +0000 (+0000) Subject: MFH: Fix from Michael Sisolak (destructors weren't always properly called) X-Git-Tag: php-4.3.5RC1~59 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f72080cb48576197a5a1f18a84ed889ccdbf2614;p=php MFH: Fix from Michael Sisolak (destructors weren't always properly called) --- diff --git a/TSRM/TSRM.c b/TSRM/TSRM.c index c9116222fb..6287002330 100644 --- a/TSRM/TSRM.c +++ b/TSRM/TSRM.c @@ -157,7 +157,10 @@ TSRM_API void tsrm_shutdown(void) int j; next_p = p->next; - for (j=0; jcount; j++) { + if (resource_types_table && resource_types_table[j].dtor) { + resource_types_table[j].dtor(p->storage[j], &p->storage); + } free(p->storage[j]); } free(p->storage);