thunderbolt: tb: fix use after free in tb_activate_pcie_devices
authorGustavo A. R. Silva <garsilva@embeddedor.com>
Sun, 5 Nov 2017 04:52:54 +0000 (23:52 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 6 Nov 2017 17:22:33 +0000 (18:22 +0100)
commita2e373438f72391493a4425efc1b82030b6b4fd5
treec7ccb397642d1f4d4f4e2bc693cff0f7166e6b46
parentcc5284142268bbcb70cafdf110d6cf4c4f9714e5
thunderbolt: tb: fix use after free in tb_activate_pcie_devices

Add a ̣̣continue statement in order to avoid using a previously
free'd pointer tunnel in list_add.

Addresses-Coverity-ID: 1415336
Fixes: 9d3cce0b6136 ("thunderbolt: Introduce thunderbolt bus and connection manager")
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/thunderbolt/tb.c