Commit 2c0a9687 authored by Max Kellermann's avatar Max Kellermann

storage/smbclient: use std::lock_guard

parent 84c406d5
......@@ -59,9 +59,8 @@ public:
:base(_base), ctx(_ctx) {}
virtual ~SmbclientStorage() {
smbclient_mutex.lock();
const std::lock_guard<Mutex> lock(smbclient_mutex);
smbc_free_context(ctx, 1);
smbclient_mutex.unlock();
}
/* virtual methods from class Storage */
......@@ -153,9 +152,8 @@ SkipNameFS(const char *name) noexcept
SmbclientDirectoryReader::~SmbclientDirectoryReader()
{
smbclient_mutex.lock();
const std::lock_guard<Mutex> lock(smbclient_mutex);
smbc_close(handle);
smbclient_mutex.unlock();
}
const char *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment