Subject: insmod: Fixes grab_file() NULL pointer.
authorJonathan Masters <jcm@jcm.boston.redhat.com>
Fri, 8 Dec 2006 10:03:52 +0000 (05:03 -0500)
committerJonathan Masters <jcm@jcm.boston.redhat.com>
Fri, 8 Dec 2006 10:03:52 +0000 (05:03 -0500)
commit556e85135b4751e9de1bda99249a2c6b63de3c81
tree5d50a2e3e3afd2abd34f58e9fcc096789b06120e
parentd33fa4603a2e76c912fcbe54e967b3cdebf4a32b
Subject: insmod: Fixes grab_file() NULL pointer.

If realloc() fails, it will return NULL and we'll pass 'NULL + *size' to
read().

This patch fixes it by adding the proper check and a new variable to store
the realloc() return value, to avoid leaking memory.

Signed-off-by: Luiz Fernando N. Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Jon Masters <jcm@jonmasters.org>
insmod.c