mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-23 13:04:29 +00:00
Fix possible dereference on blank inputs during input_pool.
This commit is contained in:
parent
1a789a40c7
commit
9a928e3407
7
main.c
7
main.c
@ -3126,8 +3126,8 @@ static char *curses_input(const char *query)
|
|||||||
|
|
||||||
static bool input_pool(bool live)
|
static bool input_pool(bool live)
|
||||||
{
|
{
|
||||||
char *url, *user, *pass;
|
char *url = NULL, *user = NULL, *pass = NULL;
|
||||||
struct pool *pool;
|
struct pool *pool = NULL;
|
||||||
bool ret = false;
|
bool ret = false;
|
||||||
|
|
||||||
immedok(logwin, true);
|
immedok(logwin, true);
|
||||||
@ -3179,13 +3179,14 @@ out:
|
|||||||
immedok(logwin, false);
|
immedok(logwin, false);
|
||||||
|
|
||||||
if (!ret) {
|
if (!ret) {
|
||||||
free(pool);
|
|
||||||
if (url)
|
if (url)
|
||||||
free(url);
|
free(url);
|
||||||
if (user)
|
if (user)
|
||||||
free(user);
|
free(user);
|
||||||
if (pass)
|
if (pass)
|
||||||
free(pass);
|
free(pass);
|
||||||
|
if (pool)
|
||||||
|
free(pool);
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user