diff --git a/NEWS b/NEWS index 68df6ab75ae..823e8ad40d4 100644 --- a/NEWS +++ b/NEWS @@ -11,6 +11,9 @@ PHP NEWS . Fixed GH-12077 (PHP 8.3.0RC1 borked socket-close-on-exec.phpt). (Jakub Zelenka) +- ODBC: + . Fixed memory leak with failed SQLPrepare. (NattyNarwhal) + - SPL: . Fixed bug GH-11972 (RecursiveCallbackFilterIterator regression in 8.1.18). (nielsdos) diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c index 30e85f17ca2..a680cf46c34 100644 --- a/ext/odbc/php_odbc.c +++ b/ext/odbc/php_odbc.c @@ -845,6 +845,7 @@ PHP_FUNCTION(odbc_prepare) break; default: odbc_sql_error(conn, result->stmt, "SQLPrepare"); + efree(result); RETURN_FALSE; }