mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-09-28 19:20:30 +00:00
IB/mlx4: Optimize freeing of items on error unwind
On failure, we loop through all possible pointers and test them before calling kfree. But really, why even attempt to free items we didn't allocate when we can easily loop through exactly and only the devices for which the original memory allocation succeeded and free just those. Signed-off-by: Maninder Singh <maninder1.s@samsung.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
This commit is contained in:
parent
43bfb9729e
commit
a39a98ff4c
1 changed files with 3 additions and 5 deletions
Loading…
Add table
Add a link
Reference in a new issue