Fix use-after-free in StorageURL when switching URLs

This commit is contained in:
Michael Kolupaev 2023-06-21 23:46:12 +00:00
parent f35faa4b8f
commit 2498170253
2 changed files with 3 additions and 0 deletions

View File

@ -153,6 +153,7 @@ public:
/// * Parallel reading.
/// To enable it, make sure `buf` is a SeekableReadBuffer implementing readBigAt().
/// * Parallel parsing.
/// `buf` must outlive the returned IInputFormat.
InputFormatPtr getInput(
const String & name,
ReadBuffer & buf,

View File

@ -361,6 +361,8 @@ Chunk StorageURLSource::generate()
pipeline->reset();
reader.reset();
input_format.reset();
read_buf.reset();
}
return {};
}