From: Antony Dovgal Date: Sun, 18 Dec 2005 12:50:28 +0000 (+0000) Subject: MFH: fix possible usage of uninitialized variable X-Git-Tag: php-5.1.2RC1~70 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=46f922bdf795f07effc0c435fe54c9de74c22939;p=php MFH: fix possible usage of uninitialized variable --- diff --git a/ext/sysvmsg/sysvmsg.c b/ext/sysvmsg/sysvmsg.c index affa6e20ad..0a33de4133 100644 --- a/ext/sysvmsg/sysvmsg.c +++ b/ext/sysvmsg/sysvmsg.c @@ -341,8 +341,9 @@ PHP_FUNCTION(msg_receive) if (!php_var_unserialize(&tmp, &p, p + result, &var_hash TSRMLS_CC)) { php_error_docref(NULL TSRMLS_CC, E_WARNING, "message corrupted"); RETVAL_FALSE; + } else { + REPLACE_ZVAL_VALUE(&out_message, tmp, 0); } - REPLACE_ZVAL_VALUE(&out_message, tmp, 0); FREE_ZVAL(tmp); PHP_VAR_UNSERIALIZE_DESTROY(var_hash); } else {