]> git.karo-electronics.de Git - karo-tx-linux.git/commit
amd64_edac: Fix potential memleak
authorBorislav Petkov <borislav.petkov@amd.com>
Tue, 29 Mar 2011 16:10:53 +0000 (18:10 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 14 Apr 2011 20:02:03 +0000 (13:02 -0700)
commit53a624a9467771174585e85b4b6b3d7f23ec9526
tree8de501a076a2960db2e0baf79981487177d74f90
parent668c06b8508308dc98e2dcf644c340d3c15ef99c
amd64_edac: Fix potential memleak

commit a9f0fbe2bbf328f869fc5ee5a12c6a4118c32689 upstream.

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.

Reported-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Borislav Petkov <borislav.petkov@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/edac/amd64_edac.c