aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2012-01-24 20:02:32 +0100
committerMax Kellermann <max@duempel.org>2012-01-24 20:02:32 +0100
commit1bab735580f83932407b90c722bd021a49c389e8 (patch)
treec2923529e8a55b206cf38c786cd20ffcc1ca1ab2
parenta0fcd0cf22d1eb70afad394d0676635e033ac703 (diff)
downloadmpd-1bab735580f83932407b90c722bd021a49c389e8.tar.gz
mpd-1bab735580f83932407b90c722bd021a49c389e8.tar.xz
mpd-1bab735580f83932407b90c722bd021a49c389e8.zip
dirvec: unlock mutex in dirvec_find() in all branches
Diffstat (limited to '')
-rw-r--r--src/dirvec.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/dirvec.c b/src/dirvec.c
index 55021c16e..acc573e13 100644
--- a/src/dirvec.c
+++ b/src/dirvec.c
@@ -54,8 +54,11 @@ struct directory *dirvec_find(const struct dirvec *dv, const char *path)
db_lock();
for (i = dv->nr; --i >= 0; )
- if (!strcmp(directory_get_name(dv->base[i]), path))
+ if (!strcmp(directory_get_name(dv->base[i]), path)) {
+ db_unlock();
return dv->base[i];
+ }
+
db_unlock();
return NULL;