summaryrefslogtreecommitdiff
path: root/net/qrtr
diff options
context:
space:
mode:
authorTong Zhang <ztong0001@gmail.com>2021-03-14 14:08:36 -0400
committerDavid S. Miller <davem@davemloft.net>2021-03-14 14:17:48 -0700
commit6577b9a551aedb86bca6d4438c28386361845108 (patch)
tree4ddf370837f645d0d38984311ac199013c218be4 /net/qrtr
parentad236ccde19a93309cba25fb8c9e789b9c69397c (diff)
net: arcnet: com20020 fix error handling
There are two issues when handling error case in com20020pci_probe() 1. priv might be not initialized yet when calling com20020pci_remove() from com20020pci_probe(), since the priv is set at the very last but it can jump to error handling in the middle and priv remains NULL. 2. memory leak - the net device is allocated in alloc_arcdev but not properly released if error happens in the middle of the big for loop [ 1.529110] BUG: kernel NULL pointer dereference, address: 0000000000000008 [ 1.531447] RIP: 0010:com20020pci_remove+0x15/0x60 [com20020_pci] [ 1.536805] Call Trace: [ 1.536939] com20020pci_probe+0x3f2/0x48c [com20020_pci] [ 1.537226] local_pci_probe+0x48/0x80 [ 1.539918] com20020pci_init+0x3f/0x1000 [com20020_pci] Signed-off-by: Tong Zhang <ztong0001@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/qrtr')
0 files changed, 0 insertions, 0 deletions