iliaa Wed Jun 30 09:43:07 2004 EDT
Modified files:
/php-src/ext/msession msession.c
Log:
Another instance where alloca() is not needed.
http://cvs.php.net/diff.php/php-src/ext/msession/msession.c?r1=1.45&r2=1.46&ty=u
Index: php-src/ext/msession/msession.c
diff -u php-src/ext/msession/msession.c:1.45 php-src/ext/msession/msession.c:1.46
--- php-src/ext/msession/msession.c:1.45 Thu Jan 8 12:32:26 2004
+++ php-src/ext/msession/msession.c Wed Jun 30 09:43:07 2004
@@ -1290,7 +1290,7 @@
{
int port;
int len = strlen(save_path)+1;
- char * path = alloca(len);
+ char * path = emalloc(len);
char * szport;
strcpy(path, save_path);
@@ -1309,7 +1309,13 @@
ELOG( "ps_open_msession");
PS_SET_MOD_DATA((void *)1); /* session.c needs a non-zero here! */
- return PHPMsessionConnect(path, port) ? SUCCESS : FAILURE;
+ if (PHPMsessionConnect(path, port)) {
+ efree(path);
+ return SUCCESS;
+ } else {
+ efree(path);
+ return FAILURE;
+ }
}
PS_CLOSE_FUNC(msession)
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php