dirvec: unlock mutex in dirvec_find() in all branches
This commit is contained in:
parent
a0fcd0cf22
commit
1bab735580
@ -54,8 +54,11 @@ struct directory *dirvec_find(const struct dirvec *dv, const char *path)
|
|||||||
|
|
||||||
db_lock();
|
db_lock();
|
||||||
for (i = dv->nr; --i >= 0; )
|
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];
|
return dv->base[i];
|
||||||
|
}
|
||||||
|
|
||||||
db_unlock();
|
db_unlock();
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user