aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorIan Abbott <abbotti@mev.co.uk>2013-06-28 17:09:17 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-07-23 14:27:50 -0700
commit725a70d8a68ef5368652c0c49631fefb361d62cf (patch)
tree71dfe83245b4881ae61c9c59edc027e9c73262f4 /kernel
parentstaging: comedi: use a mutex when accessing driver list (diff)
staging: comedi: ni_labpc: fix possible double-free of dma_buffer
If `labpc_attach()` allocates memory for `devpriv->dma_buffer` but fails to request a DMA channel, it frees `devpriv->dma_buffer` but leaves the pointer set. Later, `labpc_detach()` frees `devpriv->dma_buffer` again, which means it has been freed twice in this case. Fix it by only setting `devpriv->dma_buffer` in `labpc_attach()` if the DMA channel was requested successfully. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'kernel')
0 files changed, 0 insertions, 0 deletions