mirror of
https://github.com/falk-werner/webfuse
synced 2025-06-13 12:54:15 +00:00
fixes memory leak
This commit is contained in:
parent
21b48f382c
commit
2d70ba71c5
@ -50,13 +50,14 @@ static bool authenticate(struct wf_credentials * creds, void * user_data)
|
|||||||
char const * password = wf_credentials_get(creds, "password");
|
char const * password = wf_credentials_get(creds, "password");
|
||||||
if ((NULL != username) && (NULL != password))
|
if ((NULL != username) && (NULL != password))
|
||||||
{
|
{
|
||||||
struct userdb * db = userdb_create("<pepper>");
|
struct userdb * db = userdb_create("");
|
||||||
result = userdb_load(db, args->passwd_path);
|
result = userdb_load(db, args->passwd_path);
|
||||||
if (result)
|
if (result)
|
||||||
{
|
{
|
||||||
result = userdb_check(db, username, password);
|
result = userdb_check(db, username, password);
|
||||||
userdb_dispose(db);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
userdb_dispose(db);
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
Loading…
Reference in New Issue
Block a user