input/smbclient: use std::lock_guard

This commit is contained in:
Max Kellermann 2019-04-25 19:33:32 +02:00
parent 2c0a968735
commit 36aa204575
1 changed files with 1 additions and 2 deletions

View File

@ -45,10 +45,9 @@ public:
} }
~SmbclientInputStream() { ~SmbclientInputStream() {
smbclient_mutex.lock(); const std::lock_guard<Mutex> lock(smbclient_mutex);
smbc_close(fd); smbc_close(fd);
smbc_free_context(ctx, 1); smbc_free_context(ctx, 1);
smbclient_mutex.unlock();
} }
/* virtual methods from InputStream */ /* virtual methods from InputStream */