提交 44176d9f 编写于 作者: D Dan Carpenter 提交者: Greg Kroah-Hartman

Staging: mrst-touchscreen: fix dereferencing free memory

I moved the kfree() down a couple lines after the dereference.
Signed-off-by: NDan Carpenter <error27@gmail.com>
Acked-by: NAlan Cox <alan@linux.intel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 eb169d1c
...@@ -817,9 +817,9 @@ static int mrstouch_remove(struct spi_device *spi) ...@@ -817,9 +817,9 @@ static int mrstouch_remove(struct spi_device *spi)
free_irq(mrstouchdevp->irq, mrstouchdevp); free_irq(mrstouchdevp->irq, mrstouchdevp);
input_unregister_device(mrstouchdevp->input); input_unregister_device(mrstouchdevp->input);
input_free_device(mrstouchdevp->input); input_free_device(mrstouchdevp->input);
kfree(mrstouchdevp);
if (mrstouchdevp->pendet_thrd) if (mrstouchdevp->pendet_thrd)
kthread_stop(mrstouchdevp->pendet_thrd); kthread_stop(mrstouchdevp->pendet_thrd);
kfree(mrstouchdevp);
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册