diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2006-04-17 23:29:46 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2006-04-17 23:29:46 +0000 |
commit | 333787ff7fe42c3afb59d4b14d206a16da3639bd (patch) | |
tree | 6a4dab4657c24cb03e5c9cc4e471aa8a19118e85 | |
parent | 8bd77961847d605758a25b54026cf6b880e04d90 (diff) | |
download | php-git-333787ff7fe42c3afb59d4b14d206a16da3639bd.tar.gz |
MFB51: Fixed Bug #36872 (session_destroy() fails after call to
session_regenerate_id(true)).
-rw-r--r-- | ext/session/mod_files.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ext/session/mod_files.c b/ext/session/mod_files.c index 1bdbdfdcde..4c2a0a03d9 100644 --- a/ext/session/mod_files.c +++ b/ext/session/mod_files.c @@ -397,10 +397,12 @@ PS_DESTROY_FUNC(files) 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; |