Skip to content

Commit

Permalink
BUG: Do not access cfg when cfg is free
Browse files Browse the repository at this point in the history
  • Loading branch information
mattiaswal committed Jun 11, 2018
1 parent 890bdec commit eefa59b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/dhcp-helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,8 @@ static void cleanup(struct ev_loop *loop)
}
}
/* UDP socket not necessary to 'restart' */
conf_free(cfg);
cleanup_nftables(cfg);
conf_free(cfg);
}

static struct ev_loop *init(struct ev_loop *loop, char *fname)
Expand Down
1 change: 1 addition & 0 deletions src/misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ int cleanup_nftables(cfg_t *cfg)
}

if (anybridged) {
syslog2(LOG_DEBUG, "Some interfaces is bridged, remove nftables rules");
if (system("nft delete chain bridge filter " NFT_IN_CHAIN))
syslog2(LOG_ERR, "Failed deleting nftables input rules");
if (system("nft delete chain bridge filter " NFT_FWD_CHAIN))
Expand Down

0 comments on commit eefa59b

Please sign in to comment.