ixgbe: fix memory leaks
authorWenwen Wang <wenwen@cs.uga.edu>
Sun, 11 Aug 2019 20:07:47 +0000 (15:07 -0500)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Wed, 11 Sep 2019 16:10:45 +0000 (09:10 -0700)
commit22d11eacc32cab558e2620b6aad55d07e661847c
tree2b535a4a5c7c63b12e6fe980912a8812fc33cf69
parentc1609946b8b6485e1d405663004867ea9e92178a
ixgbe: fix memory leaks

In ixgbe_configure_clsu32(), 'jump', 'input', and 'mask' are allocated
through kzalloc() respectively in a for loop body. Then,
ixgbe_clsu32_build_input() is invoked to build the input. If this process
fails, next iteration of the for loop will be executed. However, the
allocated 'jump', 'input', and 'mask' are not deallocated on this execution
path, leading to memory leaks.

Signed-off-by: Wenwen Wang <wenwen@cs.uga.edu>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c