diff options
author | Ilia Alshanetsky <iliaa@php.net> | 2006-04-17 23:29:37 +0000 |
---|---|---|
committer | Ilia Alshanetsky <iliaa@php.net> | 2006-04-17 23:29:37 +0000 |
commit | da6fe839bffee6391db848e843aea740de037c75 (patch) | |
tree | 56f8786cecbd37e60575e0eef8acf523208ceeb8 | |
parent | 0f2418d4702c874fc4dddc84efbeaab966c5f7b8 (diff) | |
download | php-git-da6fe839bffee6391db848e843aea740de037c75.tar.gz |
MFH: 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 63a51875df..06af01a13d 100644 --- a/ext/session/mod_files.c +++ b/ext/session/mod_files.c @@ -364,10 +364,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; |