iliaa           Mon Apr 17 23:29:37 2006 UTC

  Modified files:              (Branch: PHP_4_4)
    /php-src/ext/session        mod_files.c 
  Log:
  MFH: Fixed Bug #36872 (session_destroy() fails after call to 
  session_regenerate_id(true)).
  
  
http://cvs.php.net/viewcvs.cgi/php-src/ext/session/mod_files.c?r1=1.83.2.9.2.2&r2=1.83.2.9.2.3&diff_format=u
Index: php-src/ext/session/mod_files.c
diff -u php-src/ext/session/mod_files.c:1.83.2.9.2.2 
php-src/ext/session/mod_files.c:1.83.2.9.2.3
--- php-src/ext/session/mod_files.c:1.83.2.9.2.2        Sun Jan  1 13:46:56 2006
+++ php-src/ext/session/mod_files.c     Mon Apr 17 23:29:37 2006
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: mod_files.c,v 1.83.2.9.2.2 2006/01/01 13:46:56 sniper Exp $ */
+/* $Id: mod_files.c,v 1.83.2.9.2.3 2006/04/17 23:29:37 iliaa Exp $ */
 
 #include "php.h"
 
@@ -364,10 +364,12 @@
        if (!ps_files_path_create(buf, sizeof(buf), data, key))
                return FAILURE;
        
-       ps_files_close(data);
+       if (data->fd != -1) {
+               ps_files_close(data);
        
-       if (VCWD_UNLINK(buf) == -1) {
-               return FAILURE;
+               if (VCWD_UNLINK(buf) == -1) {
+                       return FAILURE;
+               }
        }
 
        return SUCCESS;

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

Reply via email to