Skip to content
Commit 777e5d3e authored by Chase Southwood's avatar Chase Southwood Committed by Greg Kroah-Hartman
Browse files

Staging: comedi: fix memory leak in comedi_bond.c



We allocate bdev and then krealloc the devs pointer in order to add bdev
at the end of the devpriv->devs array list.  But if for some reason this
krealloc fails, we need to free bdev before returning an error otherwise
this memory is leaked.

Signed-off-by: default avatarChase Southwood <chase.southwood@yahoo.com>
Acked-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8542373d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment