Skip to content

Commit

Permalink
lib-fs: fs_unlock(NULL) should be a no-op
Browse files Browse the repository at this point in the history
  • Loading branch information
Josef 'Jeff' Sipek authored and sirainen committed May 26, 2018
1 parent 0a4cf11 commit 0e16bc7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/lib-fs/fs-api.c
Expand Up @@ -897,6 +897,9 @@ void fs_unlock(struct fs_lock **_lock)
{
struct fs_lock *lock = *_lock;

if (lock == NULL)
return;

*_lock = NULL;
T_BEGIN {
lock->file->fs->v.unlock(lock);
Expand Down

0 comments on commit 0e16bc7

Please sign in to comment.