]> granicus.if.org Git - php/commitdiff
fix leak in 5.6
authorAnatol Belski <ab@php.net>
Fri, 29 Jan 2016 12:56:11 +0000 (13:56 +0100)
committerAnatol Belski <ab@php.net>
Fri, 29 Jan 2016 12:56:11 +0000 (13:56 +0100)
ext/session/mod_files.c

index 7e373812d76fac07755be5b6b914f7590b1069d0..06659e3487fa807ee25da350fb0a05eb013a540d 100644 (file)
@@ -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;
        }