summaryrefslogtreecommitdiff
path: root/lib/mpi/mpi-div.c
diff options
context:
space:
mode:
authorIan Abbott <abbotti@mev.co.uk>2013-08-20 11:50:19 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-12-20 07:34:21 -0800
commit70a9deaa57ee1572c95dce7ec1991bf018728f3a (patch)
tree5669b2acfc49a092d39eb154fb7e2ac53ed43911 /lib/mpi/mpi-div.c
parente71859894bfd0ceaf65e98bf287478242d17a9ec (diff)
staging: comedi: pcmuio: fix possible NULL deref on detach
commit 2fd2bdfccae61efe18f6b92b6a45fbf936d75b48 upstream. 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 'lib/mpi/mpi-div.c')
0 files changed, 0 insertions, 0 deletions