com php-src: Fixed memleak (3 tests fails now): ext/pgsql/pgsql.c

From: Date: Mon, 19 May 2014 06:57:17 +0000
Subject: com php-src: Fixed memleak (3 tests fails now): ext/pgsql/pgsql.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-78460@lists.php.net to get a copy of this message
Commit: a8160322851a30dc908ec4681c20d3b86af1f199 Author: Xinchen Hui <laruence@php.net> Mon, 19 May 2014 14:57:17 +0800 Parents: 98f801ccbc23206a76892440822fb75448d0921e Branches: phpng Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=a8160322851a30dc908ec4681c20d3b86af1f199 Log: Fixed memleak (3 tests fails now) Changed paths: M ext/pgsql/pgsql.c Diff: diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index be1f31c..9d8cf2d 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -1357,7 +1357,7 @@ static void php_pgsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) /* hash it up */ new_le.type = le_plink; new_le.ptr = pgsql; - if (zend_hash_update_mem(&EG(persistent_list), str.s, &new_le, sizeof(zend_resource)) == NULL) { + if (zend_hash_str_update_mem(&EG(persistent_list), str.s->val, str.s->len, &new_le, sizeof(zend_resource)) == NULL) { goto err; } PGG(num_links)++;

« previous php.cvs (#78460) next »