[php-src] master: Fix memory leak in mysqlnd_vio::open_pipe

From: Date: Sun, 21 Apr 2024 14:08:28 +0000
Subject: [php-src] master: Fix memory leak in mysqlnd_vio::open_pipe
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-128189@lists.php.net to get a copy of this message
Author: Niels Dossche (nielsdos) Date: 2024-04-21T16:07:40+02:00 Commit: https://github.com/php/php-src/commit/319fb50eca9eb0286ee23c26b9e487127291cd02 Raw diff: https://github.com/php/php-src/commit/319fb50eca9eb0286ee23c26b9e487127291cd02.diff Fix memory leak in mysqlnd_vio::open_pipe This fixes the memory leak part of GH-10599. Changed paths: M ext/mysqlnd/mysqlnd_vio.c Diff: diff --git a/ext/mysqlnd/mysqlnd_vio.c b/ext/mysqlnd/mysqlnd_vio.c index c12317c436605..7d55418e7cd72 100644 --- a/ext/mysqlnd/mysqlnd_vio.c +++ b/ext/mysqlnd/mysqlnd_vio.c @@ -141,6 +141,7 @@ MYSQLND_METHOD(mysqlnd_vio, open_pipe)(MYSQLND_VIO * const vio, const MYSQLND_CS EG(regular_list).pDestructor = NULL; zend_hash_index_del(&EG(regular_list), net_stream->res->handle); /* ToDO: should it be res->handle, do streams register with addref ?*/ EG(regular_list).pDestructor = origin_dtor; + efree(net_stream->res); net_stream->res = NULL; DBG_RETURN(net_stream);

« previous php.cvs (#128189) next »