mptcp: unbreak JSON endpoint list

the following command:

 # ip -j mptcp endpoint show

prints a JSON array that misses the terminating bracket. Fix this calling
delete_json_obj() to balance the call to new_json_obj().

Fixes: 7e0767cd86 ("add support for mptcp netlink interface")
Signed-off-by: Davide Caratti <dcaratti@redhat.com>
Acked-by: Andrea Claudi <aclaudi@redhat.com>
This commit is contained in:
Davide Caratti 2021-09-30 17:19:25 +02:00 committed by Stephen Hemminger
parent 2f5825cb38
commit e7a98a96f0
1 changed files with 1 additions and 1 deletions

View File

@ -278,7 +278,7 @@ static int mptcp_addr_dump(void)
return -2;
}
close_json_object();
delete_json_obj();
fflush(stdout);
return 0;
}