dmitry          Wed Jun 11 07:46:43 2008 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src/ext/session        session.c 
  Log:
  Fixed memory leaks
  
  
http://cvs.php.net/viewvc.cgi/php-src/ext/session/session.c?r1=1.417.2.8.2.42&r2=1.417.2.8.2.43&diff_format=u
Index: php-src/ext/session/session.c
diff -u php-src/ext/session/session.c:1.417.2.8.2.42 
php-src/ext/session/session.c:1.417.2.8.2.43
--- php-src/ext/session/session.c:1.417.2.8.2.42        Tue Apr 29 14:42:38 2008
+++ php-src/ext/session/session.c       Wed Jun 11 07:46:43 2008
@@ -17,7 +17,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: session.c,v 1.417.2.8.2.42 2008/04/29 14:42:38 scottmac Exp $ */
+/* $Id: session.c,v 1.417.2.8.2.43 2008/06/11 07:46:43 dmitry Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -1509,6 +1509,15 @@
 
        zend_alter_ini_entry("session.save_handler", 
sizeof("session.save_handler"), "user", sizeof("user")-1, PHP_INI_USER, 
PHP_INI_STAGE_RUNTIME);
 
+       mdata = PS(mod_data);
+
+       if (mdata) {
+               for (i = 0; i < 6; i++) {
+                       zval_ptr_dtor(&mdata->names[i]);
+               }
+               efree(mdata);
+       }
+
        mdata = emalloc(sizeof(*mdata));
 
        for (i = 0; i < 6; i++) {



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to