Fixed minor format errors and resource leaks
Some format strings used integer values for unsigned integers. Memory and file descriptors leaked in some error conditions.
This commit is contained in:
@ -1623,6 +1623,7 @@ char err_msg[STRERROR_BUFLEN];
|
||||
|
||||
if(chmod(tmp_file, S_IRUSR | S_IWUSR) < 0) {
|
||||
snprintf(error, BINLOG_ERROR_MSG_LEN, "%s, errno %u", strerror_r(errno, err_msg, sizeof(err_msg)), errno);
|
||||
fclose(config_file);
|
||||
return 2;
|
||||
}
|
||||
|
||||
|
@ -3462,7 +3462,7 @@ static bool select_connect_backend_servers(
|
||||
MXS_WARNING("Couldn't connect to any of the %d "
|
||||
"slaves. Routing to %s only.",
|
||||
slaves_found,
|
||||
(is_synced_master ? "Galera nodes" : "Master"))));
|
||||
(is_synced_master ? "Galera nodes" : "Master"));
|
||||
#endif
|
||||
}
|
||||
else if (slaves_found == 0)
|
||||
|
Reference in New Issue
Block a user