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:
Markus Makela
2015-11-25 10:40:16 +02:00
parent dcf0d4ef4b
commit 038877b8db
6 changed files with 7 additions and 6 deletions

View File

@ -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;
}

View File

@ -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)