kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] sfi: returning freed pointer
@ 2010-05-28 10:33 Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2010-05-28 10:33 UTC (permalink / raw)
  To: kernel-janitors

We never actually use the return value of sfi_sysfs_install_table() but
it still seems wrong to return a freed pointer.

Signed-off-by: Dan Carpenter <error27@gmail.com>

diff --git a/drivers/sfi/sfi_core.c b/drivers/sfi/sfi_core.c
index 0051959..ceba593 100644
--- a/drivers/sfi/sfi_core.c
+++ b/drivers/sfi/sfi_core.c
@@ -441,8 +441,10 @@ struct sfi_table_attr __init *sfi_sysfs_install_table(u64 pa)
 
 	ret = sysfs_create_bin_file(tables_kobj,
 				  &tbl_attr->attr);
-	if (ret)
+	if (ret) {
 		kfree(tbl_attr);
+		tbl_attr = NULL;
+	}
 
 	sfi_unmap_table(th);
 	return tbl_attr;

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

* Re: [patch] sfi: returning freed pointer
@ 2010-06-01 16:06 Len Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Len Brown @ 2010-06-01 16:06 UTC (permalink / raw)
  To: kernel-janitors

applied

thanks,
Len Brown, Intel Open Source Technology Center


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

end of thread, other threads:[~2010-06-01 16:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-28 10:33 [patch] sfi: returning freed pointer Dan Carpenter
  -- strict thread matches above, loose matches on Subject: below --
2010-06-01 16:06 Len Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).