summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 702ef302..8e7b586d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -351,8 +351,10 @@ static int nft_run_cmd_from_filename(struct nft_ctx *nft, const char *filename)
parser_init(nft->nf_sock, &nft->cache, &state, &msgs, nft->debug_mask);
scanner = scanner_init(&state);
- if (scanner_read_file(scanner, filename, &internal_location) < 0)
+ if (scanner_read_file(scanner, filename, &internal_location) < 0) {
+ rc = NFT_EXIT_FAILURE;
goto err;
+ }
if (nft_run(nft, nft->nf_sock, scanner, &state, &msgs) != 0)
rc = NFT_EXIT_FAILURE;