File tree Expand file tree Collapse file tree 1 file changed +1
-3
lines changed
Expand file tree Collapse file tree 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)
295295
296296static void php_pgsql_set_default_link (zval * link )
297297{
298- GC_ADDREF (Z_OBJ_P (link ));
299-
300298 if (PGG (default_link ) != NULL ) {
301299 pgsql_link_free (FETCH_DEFAULT_LINK ());
302300 }
@@ -774,7 +772,7 @@ static void php_pgsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent)
774772
775773 /* add it to the hash */
776774 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 );
778776
779777 /* Keep track of link => hash mapping, so we can remove the hash entry from regular_list
780778 * 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