Skip to content

Commit

Permalink
Fix a memory leak by not allowing session_start() to be called more t…
Browse files Browse the repository at this point in the history
…han once.
  • Loading branch information
faizshukri committed Jul 7, 1999
1 parent fdc1b92 commit e88d121
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ext/session/session.c
Expand Up @@ -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) {
Expand Down

0 comments on commit e88d121

Please sign in to comment.