public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* drivers/edac/ move a kfree() to after last use
@ 2009-12-21  4:38 Darren Jenkins
  2009-12-21 15:18 ` Borislav Petkov
  0 siblings, 1 reply; 2+ messages in thread
From: Darren Jenkins @ 2009-12-21  4:38 UTC (permalink / raw)
  To: Kernel Janitors, Linux Kernel Mailing List, dougthompson,
	borislav.petkov
  Cc: bluesmoke-devel


Move a kfree() below the last use of the memory

Coverity CID: 13142

Signed-off-by: Darren Jenkins <darrenrjenkins@gmail.com>
diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
index df5b684..15b8b3c 100644
--- a/drivers/edac/amd64_edac.c
+++ b/drivers/edac/amd64_edac.c
@@ -2925,10 +2925,10 @@ static void __devexit
amd64_remove_one_instance(struct pci_dev *pdev)
 
 	amd64_free_mc_sibling_devices(pvt);
 
-	kfree(pvt);
 	mci->pvt_info = NULL;
 
 	mci_lookup[pvt->mc_node_id] = NULL;
+	kfree(pvt);
 
 	/* unregister from EDAC MCE */
 	amd_report_gart_errors(false);



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-12-21 15:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-21  4:38 drivers/edac/ move a kfree() to after last use Darren Jenkins
2009-12-21 15:18 ` Borislav Petkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox