diff options
| author | Ian Abbott <abbotti@mev.co.uk> | 2013-08-20 11:50:19 +0100 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-22 10:07:49 -0700 |
| commit | 2fd2bdfccae61efe18f6b92b6a45fbf936d75b48 (patch) | |
| tree | 4e1baef4614cd7df3a298f3c83b53c2d30d3d7fc /tools | |
| parent | b88e75bb6576d99e0ba4f6edc978293d1ff9c01b (diff) | |
staging: comedi: pcmuio: fix possible NULL deref on detach
pcmuio_detach() is called by the comedi core even if pcmuio_attach()
returned an error, so `dev->private` might be `NULL`. Check for that
before dereferencing it.
Also, as pointed out by Dan Carpenter, there is no need to check the
pointer passed to `kfree()` is non-NULL, so remove that check.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools')
0 files changed, 0 insertions, 0 deletions
