]> git.baikalelectronics.ru Git - kernel.git/commit
amd64_edac: Fix potential memleak
authorBorislav Petkov <borislav.petkov@amd.com>
Tue, 29 Mar 2011 16:10:53 +0000 (18:10 +0200)
committerBorislav Petkov <borislav.petkov@amd.com>
Tue, 29 Mar 2011 16:19:06 +0000 (18:19 +0200)
commitd3ff6d8619ec05dcc5b8bd76a98d54b304bfdf65
tree819fdfb4224ac19a61cb2cd7c7f5a8907306ee82
parentec0406e0766db81d599cd93486f6bcce69035b51
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.

Cc: <stable@kernel.org> # 38.x
Reported-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
drivers/edac/amd64_edac.c