mirror of
https://github.com/php/php-src.git
synced 2025-01-06 02:43:34 +08:00
Fix double calls to free_contents if the connection cannot be
opened. mysqlnd have no probs, external code should not have too. In any case, double call is not needed.
This commit is contained in:
parent
e1251edc16
commit
c95fa280ed
@ -737,8 +737,6 @@ err:
|
||||
conn->scheme = NULL;
|
||||
}
|
||||
|
||||
/* This will also close conn->net->stream if it has been opened */
|
||||
conn->m->free_contents(conn TSRMLS_CC);
|
||||
MYSQLND_INC_CONN_STATISTIC(&conn->stats, STAT_CONNECT_FAILURE);
|
||||
|
||||
DBG_RETURN(FAIL);
|
||||
@ -776,6 +774,9 @@ PHPAPI MYSQLND * mysqlnd_connect(MYSQLND * conn,
|
||||
object - we are free to kill it!
|
||||
*/
|
||||
conn->m->dtor(conn TSRMLS_CC);
|
||||
} else {
|
||||
/* This will also close conn->net->stream if it has been opened */
|
||||
conn->m->free_contents(conn TSRMLS_CC);
|
||||
}
|
||||
DBG_RETURN(NULL);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user