From e6770d63619a5f5ebdd41f40ac253b93c80ecd44 Mon Sep 17 00:00:00 2001 From: Sara Golemon Date: Fri, 27 Jun 2003 03:40:55 +0000 Subject: [PATCH] Plug *half* a leak in context notifiers. We still need a check and zval_ptr_dtor(&context->notifier->ptr); in the php_stream_context_free function, but since ptr is supposed to be a general purpose container we need to define how that will be done. --- main/streams.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main/streams.c b/main/streams.c index be017d280c..8ea9f18a87 100755 --- a/main/streams.c +++ b/main/streams.c @@ -2823,6 +2823,10 @@ PHPAPI void php_stream_context_free(php_stream_context *context) zval_ptr_dtor(&context->options); context->options = NULL; } + if (context->notifier) { + php_stream_notification_free(context->notifier); + context->notifier = NULL; + } efree(context); } @@ -2831,6 +2835,7 @@ PHPAPI php_stream_context *php_stream_context_alloc(void) php_stream_context *context; context = ecalloc(1, sizeof(php_stream_context)); + context->notifier = NULL; MAKE_STD_ZVAL(context->options); array_init(context->options); -- 2.50.1