fixed several resource leak conditions found by Coverity
This commit is contained in:
@@ -1148,10 +1148,10 @@ update_rc(fko_cli_options_t *options, uint32_t args_bitmask)
|
||||
rcfile_fd = open(rcfile_update, FWKNOPRC_OFLAGS, FWKNOPRC_MODE);
|
||||
if (rcfile_fd == -1)
|
||||
{
|
||||
log_msg(LOG_VERBOSITY_WARNING,
|
||||
"update_rc() : Unable to create temporary rc file: %s: %s",
|
||||
rcfile_update, strerror(errno));
|
||||
return;
|
||||
log_msg(LOG_VERBOSITY_WARNING,
|
||||
"update_rc() : Unable to create temporary rc file: %s: %s",
|
||||
rcfile_update, strerror(errno));
|
||||
return;
|
||||
}
|
||||
close(rcfile_fd);
|
||||
|
||||
@@ -1170,6 +1170,7 @@ update_rc(fko_cli_options_t *options, uint32_t args_bitmask)
|
||||
log_msg(LOG_VERBOSITY_WARNING,
|
||||
"update_rc() : Unable to open rc file: %s: %s",
|
||||
rcfile_update, strerror(errno));
|
||||
fclose(rc);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -552,6 +552,7 @@ send_spa_packet_http(const char *spa_data, const int sd_len,
|
||||
log_msg(LOG_VERBOSITY_ERROR,
|
||||
"[-] proxy port value is invalid, must be in [%d-%d]",
|
||||
1, MAX_PORT);
|
||||
free(spa_data_copy);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user