]> git.baikalelectronics.ru Git - kernel.git/commit
uml: improved error handling while locating temp dir
authorJim Meyering <meyering@redhat.com>
Fri, 8 Feb 2008 12:22:09 +0000 (04:22 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Fri, 8 Feb 2008 17:22:43 +0000 (09:22 -0800)
commit56d5f312d5916c4f8d8d4be5ba5c9591323f9ad5
tree9b4f26d1675ef802b82b01a8780a58d21c17bd2a
parent38105b3bdf027d4c5abf1d09a632d2c806af0f19
uml: improved error handling while locating temp dir

* arch/um/os-Linux/mem.c (make_tempfile): Don't deref NULL upon failed malloc.

* arch/um/os-Linux/mem.c (make_tempfile): Handle NULL tempdir.
Don't let a long tempdir (e.g., via TMPDIR) provoke heap corruption.

[ jdike - formatting cleanups, deleted obsolete comment ]

Signed-off-by: Jim Meyering <meyering@redhat.com>
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/um/os-Linux/mem.c