TagArchive: use InputStreamPtr

This commit is contained in:
Max Kellermann 2016-02-26 13:21:27 +01:00
parent 99a05c56ad
commit b1d60b5c85

View File

@ -35,11 +35,10 @@ tag_archive_scan(Path path, const TagHandler &handler, void *handler_ctx)
Mutex mutex; Mutex mutex;
Cond cond; Cond cond;
auto *is = OpenArchiveInputStream(path, mutex, cond, IgnoreError()); InputStreamPtr is(OpenArchiveInputStream(path, mutex, cond,
if (is == nullptr) IgnoreError()));
if (!is)
return false; return false;
bool result = tag_stream_scan(*is, handler, handler_ctx); return tag_stream_scan(*is, handler, handler_ctx);
delete is;
return result;
} }