cvs: /php4 ChangeLog mod_php4.c

From: Date: Mon, 20 Sep 1999 11:54:06 +0000
Subject: cvs: /php4 ChangeLog mod_php4.c
Groups: php.version4 
Request: Send a blank email to php-version4+get-4660@lists.php.net to get a copy of this message
zeev Mon Sep 20 07:54:06 1999 EDT Modified files: /php4 ChangeLog mod_php4.c Log: Fixed a memory leak in the Apache per-directory directives handler Index: php4/ChangeLog diff -u php4/ChangeLog:1.116 php4/ChangeLog:1.117 --- php4/ChangeLog:1.116 Mon Sep 20 06:09:57 1999 +++ php4/ChangeLog Mon Sep 20 07:54:06 1999 @@ -2,6 +2,7 @@ ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ?? 1999, Version 4.0 Beta 3 +- Fixed a memory leak in the Apache per-directory directives handler (Zeev) - Added array_count_values() function. (Thies) - snmp, pgsql, mysql and gd modules can be built as dynamically loaded modules (Greg) Index: php4/mod_php4.c diff -u php4/mod_php4.c:1.26 php4/mod_php4.c:1.27 --- php4/mod_php4.c:1.26 Thu Sep 16 19:18:15 1999 +++ php4/mod_php4.c Mon Sep 20 07:54:06 1999 @@ -17,7 +17,7 @@ | PHP 4.0 patches by Zeev Suraski <zeev@zend.com> | +----------------------------------------------------------------------+ */ -/* $Id: mod_php4.c,v 1.26 1999/09/16 23:18:15 zeev Exp $ */ +/* $Id: mod_php4.c,v 1.27 1999/09/20 11:54:06 zeev Exp $ */ #include "httpd.h" #include "http_config.h" @@ -362,16 +362,20 @@ per_dir_entry->value[per_dir_entry->value_length] = 0; } -/* - * Create the per-directory config structure with defaults - */ + +static void php_destroy_per_dir_info(HashTable *per_dir_info) +{ + zend_hash_destroy(per_dir_info); + free(per_dir_info); +} + static void *php_create_dir(pool *p, char *dummy) { HashTable *per_dir_info; per_dir_info = (HashTable *) malloc(sizeof(HashTable)); zend_hash_init(per_dir_info, 5, NULL, (int (*)(void *)) destroy_per_dir_entry, 1); - register_cleanup(p, (void *) per_dir_info, (void (*)(void *)) zend_hash_destroy, (void (*)(void *)) zend_hash_destroy); + register_cleanup(p, (void *) per_dir_info, (void (*)(void *)) php_destroy_per_dir_info, (void (*)(void *)) zend_hash_destroy); return per_dir_info; }

« previous php.version4 (#4660) next »