mirror of
https://git.FreeBSD.org/src.git
synced 2024-10-18 02:19:39 +00:00
ena: Fix customer metrics deallocation statement place
Upstream commit [1] made if_alloc_domain() never fail, then also do the wrappers if_alloc(), if_alloc_dev(), and if_gethandle(). Upstream commit [2] removed the NULL check conducted by the driver. This commit also removes err_customer_metrics_alloc goto label. Commit [2] leaves behind a floating free() statement that deallocates customer_metrics_array. This commit places the deallocation statement where it belongs. [1] commit4787572d05
("ifnet: make if_alloc_domain() never fail") [2] commitaa3860851b
("net: Remove unneeded NULL check for the allocated ifnet") Approved by: cperciva (mentor) MFC after: 2 weeks Sponsored by: Amazon, Inc.
This commit is contained in:
parent
a7c5c88cb2
commit
5517ca8486
@ -3841,8 +3841,8 @@ ena_attach(device_t pdev)
|
||||
#ifdef DEV_NETMAP
|
||||
err_detach:
|
||||
ether_ifdetach(adapter->ifp);
|
||||
#endif /* DEV_NETMAP */
|
||||
free(adapter->customer_metrics_array, M_DEVBUF);
|
||||
#endif /* DEV_NETMAP */
|
||||
err_metrics_buffer_destroy:
|
||||
ena_com_delete_customer_metrics_buffer(ena_dev);
|
||||
err_msix_free:
|
||||
|
Loading…
Reference in New Issue
Block a user