Skip to content
Commit 17c19287 authored by Dan Carpenter's avatar Dan Carpenter Committed by Doug Ledford
Browse files

RDMA/siw: Fix a memory leak in siw_init_cpulist()



The error handling code doesn't free siw_cpu_info.tx_valid_cpus[0].  The
first iteration through the loop is a no-op so this is sort of an off
by one bug.  Also Bernard pointed out that we can remove the NULL
assignment and simplify the code a bit.

Fixes: bdcf26bf ("rdma/siw: network and RDMA core interface")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarBernard Metzler <bmt@zurich.ibm.com>
Reviewed-by: default avatarBernard Metzler <bmt@zurich.ibm.com>
Link: https://lore.kernel.org/r/20190809140904.GB3552@mwanda


Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent e9eec6a5
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment