diff options
| author | 2013-06-28 17:09:17 +0100 | |
|---|---|---|
| committer | 2013-07-23 14:27:50 -0700 | |
| commit | 725a70d8a68ef5368652c0c49631fefb361d62cf (patch) | |
| tree | 71dfe83245b4881ae61c9c59edc027e9c73262f4 /scripts/basic | |
| parent | staging: 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 'scripts/basic')
0 files changed, 0 insertions, 0 deletions
