1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

ext/sqlite3: Sqlite3::openBlob() code path simplification. (#20969)

* ext/sqlite3: Sqlite3::openBlob() code path simplification.

since the stream is opened in non persistent mode, the failure code path
is dead (so are the missing leaks fixes).
This commit is contained in:
David CARLIER
2026-01-20 21:34:50 +00:00
committed by GitHub
parent 44d6417bd7
commit 8f55b0850f

View File

@@ -1270,13 +1270,10 @@ PHP_METHOD(SQLite3, openBlob)
mode = "r+b";
}
// since it is not persistent, php_stream_alloc can't fail
stream = php_stream_alloc(&php_stream_sqlite3_ops, sqlite3_stream, 0, mode);
if (stream) {
php_stream_to_zval(stream, return_value);
} else {
RETURN_FALSE;
}
ZEND_ASSERT(stream != NULL);
php_stream_to_zval(stream, return_value);
}
/* }}} */