1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-12 14:14:48 +02:00

php: ensure vbuffer is not NULL before using it

This commit is contained in:
Sébastien Helleu
2018-05-17 21:59:20 +02:00
parent b0fc579955
commit f3a31f609a
+5 -2
View File
@@ -1232,8 +1232,11 @@ php_weechat_sapi_error (int type, const char *format, ...)
{
(void) type;
weechat_va_format (format);
php_weechat_ub_write (vbuffer, strlen (vbuffer));
free (vbuffer);
if (vbuffer)
{
php_weechat_ub_write (vbuffer, strlen (vbuffer));
free (vbuffer);
}
}
#if PHP_VERSION_ID >= 70100