TagArchive: use InputStreamPtr
This commit is contained in:
parent
99a05c56ad
commit
b1d60b5c85
@ -35,11 +35,10 @@ tag_archive_scan(Path path, const TagHandler &handler, void *handler_ctx)
|
||||
|
||||
Mutex mutex;
|
||||
Cond cond;
|
||||
auto *is = OpenArchiveInputStream(path, mutex, cond, IgnoreError());
|
||||
if (is == nullptr)
|
||||
InputStreamPtr is(OpenArchiveInputStream(path, mutex, cond,
|
||||
IgnoreError()));
|
||||
if (!is)
|
||||
return false;
|
||||
|
||||
bool result = tag_stream_scan(*is, handler, handler_ctx);
|
||||
delete is;
|
||||
return result;
|
||||
return tag_stream_scan(*is, handler, handler_ctx);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user