From: Dan Carpenter Date: Tue, 15 Feb 2011 10:10:08 +0000 (-0300) Subject: [media] stv090x: handle allocation failures X-Git-Tag: v2.6.39-rc1~86^2~217 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=07988007f8dd2827ba1eb39e6e3c5bbb29cfc30b;p=pandora-kernel.git [media] stv090x: handle allocation failures kmalloc() can fail so check whether state->internal is NULL. append_internal() can return NULL on allocation failures so check that. Also if we hit the error condition later in the function then there is a memory leak and we need to call remove_dev() to fix it. Also Oliver Endriss pointed out an additional leak that I missed in the first version of this patch. Signed-off-by: Dan Carpenter Acked-by: Oliver Endriss Signed-off-by: Mauro Carvalho Chehab --- Reading git-diff-tree failed