Commit ccb41007 authored by Raj's avatar Raj Committed by Stephen Hemminger

[IPV4]: Check for netdev alloc failure in ipmr.c

parent 7aeea369
......@@ -205,6 +205,9 @@ static struct net_device *ipmr_reg_vif(void)
dev = alloc_netdev(sizeof(struct net_device_stats), "pimreg",
reg_vif_setup);
if (dev == NULL)
return NULL;
if (register_netdevice(dev)) {
kfree(dev);
return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment