diff options
author | Andrey Hristov <andrey@php.net> | 1999-07-07 21:50:33 +0000 |
---|---|---|
committer | Andrey Hristov <andrey@php.net> | 1999-07-07 21:50:33 +0000 |
commit | e88d121be15a121aa231886ddca598c46d0845b9 (patch) | |
tree | 0bf93dcb77445c202fcc193281153dafc03f4ea7 /ext | |
parent | fdc1b9262ddbe24e9c9e9d229d562dd740263ee8 (diff) | |
download | php-git-e88d121be15a121aa231886ddca598c46d0845b9.tar.gz |
Fix a memory leak by not allowing session_start() to be called more than once.
Diffstat (limited to 'ext')
-rw-r--r-- | ext/session/session.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/session/session.c b/ext/session/session.c index 33facb1342..38bc55574c 100644 --- a/ext/session/session.c +++ b/ext/session/session.c @@ -338,6 +338,8 @@ static void _php_session_start(PSLS_D) int nrand; ELS_FETCH(); + if (PS(nr_open_sessions) > 0) return; + if(!PS(id) && zend_hash_find(&EG(symbol_table), PS(session_name), strlen(PS(session_name)) + 1, (void **) &ppid) == SUCCESS) { |