Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1250629 > unrolled thread

Re: [PATCH 1/2] NFC: delete null dereference

Started byDan Carpenter <dan.carpenter@oracle.com>
First post2015-10-19 15:00 +0200
Last post2015-10-19 15:00 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 1/2] NFC: delete null dereference Dan Carpenter <dan.carpenter@oracle.com> - 2015-10-19 15:00 +0200

#1250629 — Re: [PATCH 1/2] NFC: delete null dereference

FromDan Carpenter <dan.carpenter@oracle.com>
Date2015-10-19 15:00 +0200
SubjectRe: [PATCH 1/2] NFC: delete null dereference
Message-ID<qlicG-4P7-13@gated-at.bofh.it>
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web