]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
mptcp: unbreak JSON endpoint list
authorDavide Caratti <dcaratti@redhat.com>
Thu, 30 Sep 2021 15:19:25 +0000 (17:19 +0200)
committerStephen Hemminger <stephen@networkplumber.org>
Mon, 4 Oct 2021 21:07:09 +0000 (14:07 -0700)
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: 7e0767cd862b ("add support for mptcp netlink interface")
Signed-off-by: Davide Caratti <dcaratti@redhat.com>
Acked-by: Andrea Claudi <aclaudi@redhat.com>
ip/ipmptcp.c

index 44af7234267b8eff41754675952e9b90215f52e0..fd042da8a141427eb4294cb7c4daf813582060ff 100644 (file)
@@ -278,7 +278,7 @@ static int mptcp_addr_dump(void)
                return -2;
        }
 
-       close_json_object();
+       delete_json_obj();
        fflush(stdout);
        return 0;
 }