Commit f37df93b authored by Marek Vavrusa's avatar Marek Vavrusa

Coverity fixes.

Change-Id: Ieb580a23436b227fb889197cb3f4857f03ccf7ae
parent 797d931a
......@@ -52,11 +52,6 @@ pid_t pid_read(const char* fn)
char buf[64];
if (fn) {
struct stat st;
if (stat(fn, &st) != 0) {
return KNOT_ENOENT;
}
FILE *fp = fopen(fn, "r");
if (!fp) {
return KNOT_ENOENT;
......
......@@ -601,13 +601,13 @@ int remote_process(server_t *s, int r, uint8_t* buf, size_t buflen)
uint64_t ts_tmsigned = 0;
const knot_rrset_t *tsig_rr = knot_packet_tsig(pkt);
if (acl_match(conf()->ctl.acl, &a, &m) == ACL_DENY) {
knot_packet_free(&pkt);
socket_close(c);
rcu_read_unlock();
knot_packet_free(&pkt);
log_server_warning("Denied remote control for '%s@%d' "
"(doesn't match ACL).\n",
straddr, rport);
remote_senderr(c, buf, wire_len);
socket_close(c);
return KNOT_EACCES;
}
if (m && m->val) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment