Subject: Re: [PATCH iproute2-next 3/3] mptcp: monitor: add JSON support

From: Stephen Hemminger <[email-masked]>
Date: Fri, 20 Feb 2026 21:23:41 -0800

On Fri, 20 Feb 2026 19:54:03 +0100
"Matthieu Baerts (NGI0)" <[email-masked]> wrote:

> +static void sig_exit_json(int signo)
> +{
> +	delete_json_obj();
> +	rtnl_close(&genl_rth);
> +	exit(0);
> +}
> +

Technically, none of these functions are signal safe.

Maybe an atexit cleanup function, or on_exit, or destructor.