Skip to content

Commit

Permalink
staging: comedi: fix memory leak
Browse files Browse the repository at this point in the history
Instead of freeing outBuffer, inBuffer gets freed twice.

Signed-off-by: Nicolas Kaiser <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
nikai3d authored and gregkh committed Nov 16, 2010
1 parent ebba26f commit 6183826
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/staging/comedi/drivers/usbdux.c
Original file line number Diff line number Diff line change
Expand Up @@ -2295,8 +2295,8 @@ static void tidy_up(struct usbduxsub *usbduxsub_tmp)
usbduxsub_tmp->inBuffer = NULL;
kfree(usbduxsub_tmp->insnBuffer);
usbduxsub_tmp->insnBuffer = NULL;
kfree(usbduxsub_tmp->inBuffer);
usbduxsub_tmp->inBuffer = NULL;
kfree(usbduxsub_tmp->outBuffer);
usbduxsub_tmp->outBuffer = NULL;
kfree(usbduxsub_tmp->dac_commands);
usbduxsub_tmp->dac_commands = NULL;
kfree(usbduxsub_tmp->dux_commands);
Expand Down

0 comments on commit 6183826

Please sign in to comment.