From: Marcus Boerger Date: Sun, 23 Jun 2002 22:10:30 +0000 (+0000) Subject: -freeing memory for pbuf=NULL X-Git-Tag: php-4.3.0dev_zend2_alpha2~131 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=db39a2efa73fc3c5dd09a2f9ee818f4cff016419;p=php -freeing memory for pbuf=NULL #should have been one commit but to many versions during tests --- diff --git a/main/spprintf.c b/main/spprintf.c index 1177588e47..de7efc3978 100644 --- a/main/spprintf.c +++ b/main/spprintf.c @@ -632,6 +632,8 @@ PHPAPI int vspprintf(char **pbuf, size_t max_len, const char *format, va_list ap xbuf.buf[xbuf.size-1] = '\0'; if (pbuf) *pbuf = xbuf.buf; + else + efree(pbuf); return cc; } }