summaryrefslogtreecommitdiff
path: root/ip/tunnel.c
diff options
context:
space:
mode:
Diffstat (limited to 'ip/tunnel.c')
-rw-r--r--ip/tunnel.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ip/tunnel.c b/ip/tunnel.c
index 75cb0b51..c5c7a31f 100644
--- a/ip/tunnel.c
+++ b/ip/tunnel.c
@@ -419,11 +419,13 @@ int do_tunnels_list(struct tnl_print_nlmsg_info *info)
new_json_obj(json);
if (rtnl_linkdump_req(&rth, preferred_family) < 0) {
perror("Cannot send dump request\n");
+ delete_json_obj();
return -1;
}
if (rtnl_dump_filter(&rth, print_nlmsg_tunnel, info) < 0) {
fprintf(stderr, "Dump terminated\n");
+ delete_json_obj();
return -1;
}
delete_json_obj();