amd64_edac last minute fix
Subsystems (2)
Hi Linus,
please pull this last-minute amd64_edac fix for a potential memleak if it's not too late yet. If it is, I'll send it to you after -rc1 is out since it is a minor bugfix.
Thanks.
The following changes since commit 89078d572eb9ce8d4c04264b8b0ba86de0d74c8f:
md: Fix integrity registration error when no devices are capable (2011-03-28 17:53:29 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/bp/bp.git for-linus
Borislav Petkov (1):
amd64_edac: Fix potential memleak
drivers/edac/amd64_edac.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
--
commit a9f0fbe2bbf328f869fc5ee5a12c6a4118c32689
Author: Borislav Petkov <[email protected]> Date: Tue Mar 29 18:10:53 2011 +0200
amd64_edac: Fix potential memleak
We check the pointers together but at least one of them could be invalid due to failed allocation. Since we cannot continue if either of the two allocations has failed, exit early by freeing them both.
drivers/edac/amd64_edac.c +1 -1
@@ -2679,7 +2679,7 @@ static int __init amd64_edac_init(void) mcis =kzalloc (amd_nb_num () *sizeof (mcis[0 ]),GFP_KERNEL ); ecc_stngs =kzalloc (amd_nb_num () *sizeof (ecc_stngs[0 ]),GFP_KERNEL );if (!(mcis && ecc_stngs)) - goto err_ret; + goto err_free; msrs =msrs_alloc ();if (!msrs)
Signature · 8 lines
Regards/Gruss, Boris. Advanced Micro Devices GmbH Einsteinring 24, 85609 Dornach General Managers: Alberto Bozzo, Andrew Bowd Registration: Dornach, Gemeinde Aschheim, Landkreis Muenchen Registergericht Muenchen, HRB Nr. 43632