]> granicus.if.org Git - php/commitdiff
Fixed memleak (3 tests fails now)
authorXinchen Hui <laruence@php.net>
Mon, 19 May 2014 06:57:17 +0000 (14:57 +0800)
committerXinchen Hui <laruence@php.net>
Mon, 19 May 2014 06:57:17 +0000 (14:57 +0800)
ext/pgsql/pgsql.c

index be1f31cc6f1c311696d618b3f1511079ada69c44..9d8cf2d9b3d510ca326d6587c7aad56208aad677 100644 (file)
@@ -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)++;