From: Stanislav Malyshev Date: Tue, 20 Feb 2007 20:30:36 +0000 (+0000) Subject: fix unallocated free X-Git-Tag: php-5.2.2RC1~347 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=47e06ea8217d873e0228f2bacb5e2f25db199693;p=php fix unallocated free --- diff --git a/ext/com_dotnet/com_dotnet.c b/ext/com_dotnet/com_dotnet.c index 6c1c8fe95a..33a73bc2d9 100644 --- a/ext/com_dotnet/com_dotnet.c +++ b/ext/com_dotnet/com_dotnet.c @@ -275,8 +275,9 @@ PHP_FUNCTION(com_dotnet_create_instance) char buf[1024]; char *err = php_win_err(hr); snprintf(buf, sizeof(buf), "Failed to instantiate .Net object [%s] [0x%08x] %s", where, hr, err); - if (err) + if (err && err[0]) { LocalFree(err); + } php_com_throw_exception(hr, buf TSRMLS_CC); ZVAL_NULL(object); return;