Re: [PATCH] appletalk: Fix potential NULL pointer dereference in unregister_snap_client

From: David Miller
Date: Wed Mar 13 2019 - 17:03:28 EST


From: Yue Haibing <yuehaibing@xxxxxxxxxx>
Date: Tue, 12 Mar 2019 10:04:26 +0800

> timer_setup(&aarp_timer, aarp_expire_timeout, 0);
> aarp_timer.expires = jiffies + sysctl_aarp_expiry_time;
> add_timer(&aarp_timer);
> - register_netdevice_notifier(&aarp_notifier);
> + rc = register_netdevice_notifier(&aarp_notifier);
> + if (rc)
> + unregister_snap_client(aarp_dl);
> + return rc;

You've left the timer running in this error path.