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:
@@ -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);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user