diff options
author | Jacob Keller <jacob.e.keller@intel.com> | 2017-02-07 01:38:41 +0300 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2017-03-21 02:45:20 +0300 |
commit | e5187ee3ee9a95b1aa32a9a3daf4f07a9f89c20c (patch) | |
tree | 6607861cacb221079be19002d472235f2a0c43ef /tools/perf/scripts/python | |
parent | 01016da1e58136518252822738fe833c662df916 (diff) | |
download | linux-e5187ee3ee9a95b1aa32a9a3daf4f07a9f89c20c.tar.xz |
i40e: return immediately when failing to add fdir filter
Instead of setting err=true and checking this to determine when to free
the raw_packet near the end of the function, simply kfree and return
immediately. The resulting code is a bit cleaner and has one less
variable. This also resolves a subtle bug in the ipv4 case which could
fail to add the first filter and then never free the memory, resulting
in a small memory leak.
Change-ID: I7583aac033481dc794b4acaa14445059c8930ff1
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Avinash Dayanand <avinash.dayanand@intel.com>
Reviewed-by: Alan Brady <alan.brady@intel.com>
Reviewed-by: Mitch Williams <mitch.a.williams@intel.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions