MFB51: Fixed Bug #36872 (session_destroy() fails after call to

session_regenerate_id(true)).
This commit is contained in:
Ilia Alshanetsky 2006-04-17 23:29:46 +00:00
parent 8bd7796184
commit 333787ff7f

View File

@ -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;