RE: [PATCH net] driver/net: Fix possible memleaks when fail to register_netdevice

2017-04-27 Thread Gao Feng
> From: Gao Feng [mailto:gfree.w...@foxmail.com] > Sent: Thursday, April 27, 2017 4:33 PM > > From: Herbert Xu [mailto:herb...@gondor.apana.org.au] > > Sent: Thursday, April 27, 2017 4:16 PM On Tue, Apr 25, 2017 at > > 08:01:50PM +0800, gfree.w...@foxmail.com wrote: > > > From: Gao Feng

RE: [PATCH net] driver/net: Fix possible memleaks when fail to register_netdevice

2017-04-27 Thread Gao Feng
> From: Herbert Xu [mailto:herb...@gondor.apana.org.au] > Sent: Thursday, April 27, 2017 4:16 PM > On Tue, Apr 25, 2017 at 08:01:50PM +0800, gfree.w...@foxmail.com wrote: > > From: Gao Feng > > [...] > > This has the potential of creating future bugs, because there is no

Re: [PATCH net] driver/net: Fix possible memleaks when fail to register_netdevice

2017-04-27 Thread Herbert Xu
On Tue, Apr 25, 2017 at 08:01:50PM +0800, gfree.w...@foxmail.com wrote: > From: Gao Feng > > These drivers allocate kinds of resources in init routine, and free > some resources in the destructor of net_device. It may cause memleak > when some errors happen after

RE: [PATCH net] driver/net: Fix possible memleaks when fail to register_netdevice

2017-04-25 Thread Gao Feng
> From: Gao Feng > > These drivers allocate kinds of resources in init routine, and free some > resources in the destructor of net_device. It may cause memleak when some > errors happen after register_netdevice invokes the init callback. Because only > the uninit callback is