lkml.org 
[lkml]   [2015]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] NFC: delete null dereference
The next goto after that is messed up as well:

1056 dev = nfc_get_device(idx);
1057 if (!dev)
1058 return -ENODEV;
1059
1060 device_lock(&dev->dev);
1061
1062 local = nfc_llcp_find_local(dev);
1063 if (!local) {
1064 nfc_put_device(dev);

It should not call nfc_put_device() because that happens after goto
exit.

1065 rc = -ENODEV;
1066 goto exit;
1067 }

regards,
dan carpenter


\
 
 \ /
  Last update: 2015-10-19 15:21    [W:0.088 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site