summaryrefslogtreecommitdiffstats
path: root/src/libnftables.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libnftables.c')
-rw-r--r--src/libnftables.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libnftables.c b/src/libnftables.c
index 4bb770c0..eae78e8b 100644
--- a/src/libnftables.c
+++ b/src/libnftables.c
@@ -449,6 +449,8 @@ err:
nft_output_json(&nft->output) &&
nft_output_echo(&nft->output))
json_print_echo(nft);
+ if (rc)
+ cache_release(&nft->cache);
return rc;
}
@@ -497,6 +499,8 @@ err:
nft_output_json(&nft->output) &&
nft_output_echo(&nft->output))
json_print_echo(nft);
+ if (rc)
+ cache_release(&nft->cache);
return rc;
}