In the Linux kernel, the following vulnerability has been resolved:
cxgb4: fix memory leak in cxgb4initethtool_filters() error path
In the for loop used to allocate the locarray and bmap for each port, a memory leak is possible when the allocation for locarray succeeds, but the allocation for bmap fails. This is because when the control flow goes to the label freeethfinfo, only the allocations starting from (i-1)th iteration are freed.
Fix that by freeing the loc_array in the bmap allocation error path.