do-aki
null+****@clear*****
Thu Aug 7 17:15:13 JST 2014
do-aki 2014-08-07 17:15:13 +0900 (Thu, 07 Aug 2014) New Revision: 9db4ab0a56e2bbc97ecd8be8747d14021cf5f000 https://github.com/groonga/groonga/commit/9db4ab0a56e2bbc97ecd8be8747d14021cf5f000 Merged 9adf510: Merge pull request #184 from do-aki/groonga-php Message: fix memory leak in grn_ctx_recv Modified files: bindings/php/groonga.c Modified: bindings/php/groonga.c (+4 -4) =================================================================== --- bindings/php/groonga.c 2014-08-07 12:24:43 +0900 (ef70247) +++ bindings/php/groonga.c 2014-08-07 17:15:13 +0900 (0acb6d9) @@ -201,10 +201,6 @@ PHP_FUNCTION(grn_ctx_recv) int flags; unsigned int str_len, qid; - MAKE_STD_ZVAL(ret); - - array_init(ret); - array_init(return_value); if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &res) == FAILURE) { return; @@ -218,6 +214,10 @@ PHP_FUNCTION(grn_ctx_recv) RETURN_FALSE; } + MAKE_STD_ZVAL(ret); + array_init(ret); + array_init(return_value); + add_next_index_long(ret, flags); add_next_index_stringl(ret, str, str_len, 1); -------------- next part -------------- HTML����������������������������... Download