* [patch] Staging: mrst-touchscreen: dereferencing free memory
@ 2010-06-05 17:16 Dan Carpenter
2010-06-07 8:59 ` Alan Cox
0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2010-06-05 17:16 UTC (permalink / raw)
To: kernel-janitors
I moved the kfree() down a couple lines after the dereference.
Signed-off-by: Dan Carpenter <error27@gmail.com>
diff --git a/drivers/staging/mrst-touchscreen/intel-mid-touch.c b/drivers/staging/mrst-touchscreen/intel-mid-touch.c
index 1db0097..abba22f 100644
--- a/drivers/staging/mrst-touchscreen/intel-mid-touch.c
+++ b/drivers/staging/mrst-touchscreen/intel-mid-touch.c
@@ -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;
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch] Staging: mrst-touchscreen: dereferencing free memory
2010-06-05 17:16 [patch] Staging: mrst-touchscreen: dereferencing free memory Dan Carpenter
@ 2010-06-07 8:59 ` Alan Cox
0 siblings, 0 replies; 2+ messages in thread
From: Alan Cox @ 2010-06-07 8:59 UTC (permalink / raw)
To: kernel-janitors
On Sat, 5 Jun 2010 19:16:42 +0200
Dan Carpenter <error27@gmail.com> wrote:
> 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>
Thanks
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-06-07 8:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-05 17:16 [patch] Staging: mrst-touchscreen: dereferencing free memory Dan Carpenter
2010-06-07 8:59 ` Alan Cox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox