File tree 1 file changed +1
-3
lines changed
1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -295,8 +295,6 @@ static inline char * _php_pgsql_trim_result(PGconn * pgsql, char **buf)
295
295
296
296
static void php_pgsql_set_default_link (zval * link )
297
297
{
298
- GC_ADDREF (Z_OBJ_P (link ));
299
-
300
298
if (PGG (default_link ) != NULL ) {
301
299
pgsql_link_free (FETCH_DEFAULT_LINK ());
302
300
}
@@ -774,7 +772,7 @@ static void php_pgsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
774
772
775
773
/* add it to the hash */
776
774
ZVAL_COPY (& new_index_ptr , return_value );
777
- zend_hash_update_mem (& PGG (regular_list ), str .s , ( void * ) & new_index_ptr , sizeof ( zval ) );
775
+ zend_hash_update (& PGG (regular_list ), str .s , & new_index_ptr );
778
776
779
777
/* Keep track of link => hash mapping, so we can remove the hash entry from regular_list
780
778
* when the connection is closed. This uses the address of the connection rather than the
You can’t perform that action at this time.
0 commit comments