An improper locking error due to the unreleased lock
Closed this issue · 1 comments
ycaibb commented
Hi, developers, thank you for your checking. It seems the lock pool_mut
could be not released correctly in the function cloudfs_connect
?
Line 1616 in 34a6c3e
int cloudfs_connect()
{
pthread_mutex_lock(&pool_mut);
...;
if (!safe_json_string(json_obj, access_token, "access_token"))
return 0; // lack unlock
if (!safe_json_string(json_obj, token_type, "token_type"))
return 0; // lack unlock
...;
if (!safe_json_string(json_obj, token, "token"))
return 0; // lack unlock
if (!safe_json_string(json_obj, endpoint, "endpoint"))
return 0; // lack unlock
if (!safe_json_string(json_obj, expires, "expires"))
return 0; // lack unlock
...;
pthread_mutex_unlock(&pool_mut);
return (response >= 200 && response < 300 && storage_token[0]
&& storage_url[0]);
}
Best,
TurboGit commented
Indeed, thanks for reporting. Should be fixed now.