ibmvnic: Fix NAPI structures memory leak
authorThomas Falcon <tlfalcon@linux.vnet.ibm.com>
Wed, 14 Feb 2018 00:23:41 +0000 (18:23 -0600)
committerDavid S. Miller <davem@davemloft.net>
Wed, 14 Feb 2018 19:39:10 +0000 (14:39 -0500)
This memory is allocated during initialization but never freed,
so do that now.

Signed-off-by: Thomas Falcon <tlfalcon@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ibm/ibmvnic.c

index 8625f5e5b6d4a0a1966471d0cdcfb2dc05a9d048..23e0b423025ae5ce14024054a229b55a970df61c 100644 (file)
@@ -825,6 +825,8 @@ static void release_resources(struct ibmvnic_adapter *adapter)
                        }
                }
        }
+       kfree(adapter->napi);
+       adapter->napi = NULL;
 
        release_login_rsp_buffer(adapter);
 }