Commit 1bab7355 authored by Max Kellermann's avatar Max Kellermann

dirvec: unlock mutex in dirvec_find() in all branches

parent a0fcd0cf
......@@ -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;
......
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