Skip to content

Commit

Permalink
Staging: mrst-touchscreen: fix dereferencing free memory
Browse files Browse the repository at this point in the history
I moved the kfree() down a couple lines after the dereference.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Dan Carpenter authored and Greg Kroah-Hartman committed Jun 30, 2010
1 parent eb169d1 commit 44176d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/mrst-touchscreen/intel-mid-touch.c
Original file line number Diff line number Diff line change
Expand Up @@ -817,9 +817,9 @@ static int mrstouch_remove(struct spi_device *spi)
free_irq(mrstouchdevp->irq, mrstouchdevp);
input_unregister_device(mrstouchdevp->input);
input_free_device(mrstouchdevp->input);
kfree(mrstouchdevp);
if (mrstouchdevp->pendet_thrd)
kthread_stop(mrstouchdevp->pendet_thrd);
kfree(mrstouchdevp);
return 0;
}

Expand Down

0 comments on commit 44176d9

Please sign in to comment.