]> git.proxmox.com Git - mirror_ubuntu-disco-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)
commita9f0fbe2bbf328f869fc5ee5a12c6a4118c32689
tree819fdfb4224ac19a61cb2cd7c7f5a8907306ee82
parent89078d572eb9ce8d4c04264b8b0ba86de0d74c8f
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