Messages in this thread | | | Subject | Re: [PATCH] net: fjes: fix potential NULL pointer dereferences | From | Kangjie Lu <> | Date | Mon, 11 Mar 2019 23:56:24 -0500 |
| |
> On Mar 11, 2019, at 6:19 PM, David Miller <davem@davemloft.net> wrote: > > From: Kangjie Lu <kjlu@umn.edu> > Date: Mon, 11 Mar 2019 02:10:21 -0500 > >> adapter->control_wq = alloc_workqueue(DRV_NAME "/control", >> WQ_MEM_RECLAIM, 0); >> + if (!adapter->control_wq) { >> + err = -ENOMEM; >> + goto err_free_netdev; >> + } > > This error path leaks adapter->txrx_wq.
The following code also has an error-handling case: goto err_free_netdev. Shouldn’t the resource release be in err_free_netdev?
>
| |