From: Alexey Dobriyan Date: Tue, 27 Sep 2005 22:42:58 +0000 (-0700) Subject: [ROSE]: do proto_unregister() on exit paths X-Git-Tag: v2.6.14-rc3~53^2~11 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c3c4ed652e8f2c348ebdd3f2e45664a0e238ee52;p=linux-2.6 [ROSE]: do proto_unregister() on exit paths Signed-off-by: Alexey Dobriyan Signed-off-by: David S. Miller --- diff --git a/net/rose/af_rose.c b/net/rose/af_rose.c index 5acb168052..a190eaee70 100644 --- a/net/rose/af_rose.c +++ b/net/rose/af_rose.c @@ -1481,12 +1481,14 @@ static int __init rose_proto_init(void) if (rose_ndevs > 0x7FFFFFFF/sizeof(struct net_device *)) { printk(KERN_ERR "ROSE: rose_proto_init - rose_ndevs parameter to large\n"); + proto_unregister(&rose_proto); return -1; } dev_rose = kmalloc(rose_ndevs * sizeof(struct net_device *), GFP_KERNEL); if (dev_rose == NULL) { printk(KERN_ERR "ROSE: rose_proto_init - unable to allocate device structure\n"); + proto_unregister(&rose_proto); return -1; }