RE: [PHP-DEV] question
| From: | Joseph Tate | Date: | Mon, 25 Mar 2002 15:08:43 +0000 |
| Subject: | RE: [PHP-DEV] question | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-81779@lists.php.net to get a copy of this message | ||
a) Yes, if and only if memory has been allocated and you have to deallocate
it. Otherwise a memory leak occurs.
b) No if a is not the case.
> -----Original Message-----
> From: Vergoz Michael (SYSDOOR) [mailto:mvergoz@sysdoor.com]
> Sent: Sunday, March 24, 2002 6:00 PM
> To: php-dev@lists.php.net
> Subject: [PHP-DEV] question
>
>
> look this code :
>
> char buffer[MAXPATHLEN];
> char *p;
>
> if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "") == FAILURE)
> return;
>
> if((p = VCWD_GETCWD(buffer, MAXPATHLEN)) == NULL) {
> POSIX_G(last_error) = errno;
> RETURN_FALSE;
> }
>
> RETURN_STRING(buffer, 1);
>
> in this code the char pointer 'p' is really needed ?
>
> michael
>
>
> --
> PHP Development Mailing List <http://www.php.net/>
> To unsubscribe, visit: http://www.php.net/unsub.php