summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2016-01-29 13:56:11 +0100
committerFerenc Kovacs <tyrael@php.net>2016-02-03 00:58:20 +0100
commit9a4bd51a93b3c74f88436cd4ad5aebf0eaa1dc52 (patch)
tree44d71b89778260c2618c27b6e9f73c4d9f7287be
parente15b75671cf6ab67a0b6b33fc8798e2adefb39b5 (diff)
downloadphp-git-9a4bd51a93b3c74f88436cd4ad5aebf0eaa1dc52.tar.gz
fix leak in 5.6
-rw-r--r--ext/session/mod_files.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/ext/session/mod_files.c b/ext/session/mod_files.c
index 7e373812d7..06659e3487 100644
--- a/ext/session/mod_files.c
+++ b/ext/session/mod_files.c
@@ -361,6 +361,18 @@ PS_READ_FUNC(files)
}
if (!PS(id)) {
+ if (data) {
+ if (data->lastkey) {
+ efree(data->lastkey);
+ data->lastkey = NULL;
+ }
+ if (data->basedir) {
+ efree(data->basedir);
+ data->basedir = NULL;
+ }
+ efree(data);
+ *mod_data = NULL;
+ }
return FAILURE;
}