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