Fixes to Coverity defect 84478 and to 72759 which has reappeared.
This commit is contained in:
@ -572,7 +572,7 @@ return_succp:
|
|||||||
static bool resolve_maxscale_homedir(
|
static bool resolve_maxscale_homedir(
|
||||||
char** p_home_dir)
|
char** p_home_dir)
|
||||||
{
|
{
|
||||||
bool succp;
|
bool succp = false;
|
||||||
char* tmp;
|
char* tmp;
|
||||||
char* tmp2;
|
char* tmp2;
|
||||||
char* log_context = NULL;
|
char* log_context = NULL;
|
||||||
|
|||||||
@ -252,6 +252,7 @@ MAXKEYS key;
|
|||||||
"Error : failed opening /dev/random. Error %d, %s.",
|
"Error : failed opening /dev/random. Error %d, %s.",
|
||||||
errno,
|
errno,
|
||||||
strerror(errno))));
|
strerror(errno))));
|
||||||
|
close(fd);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -260,6 +261,7 @@ MAXKEYS key;
|
|||||||
LOGIF(LE, (skygw_log_write_flush(
|
LOGIF(LE, (skygw_log_write_flush(
|
||||||
LOGFILE_ERROR,
|
LOGFILE_ERROR,
|
||||||
"Error : failed to read /dev/random.")));
|
"Error : failed to read /dev/random.")));
|
||||||
|
close(fd);
|
||||||
close(randfd);
|
close(randfd);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user