diff options
author | Amerigo Wang <amwang@redhat.com> | 2009-07-01 01:06:26 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-07-30 16:06:06 -0700 |
commit | 76fc198abd7d734d45a433e4e560521f0c9cacbc (patch) | |
tree | fb5f4637102d8349f38b64443eae0c819d42cd1e /fs | |
parent | 062ca00319a240aed40c341a12ce75429f99cfee (diff) |
elf: fix one check-after-use
commit e2dbe12557d85d81f4527879499f55681c3cca4f upstream.
Check before use it.
Signed-off-by: WANG Cong <amwang@redhat.com>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: David Howells <dhowells@redhat.com>
Acked-by: Roland McGrath <roland@redhat.com>
Acked-by: James Morris <jmorris@namei.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/binfmt_elf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index e57df481235..a6f8b8f8696 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c @@ -1517,11 +1517,11 @@ static int fill_note_info(struct elfhdr *elf, int phdrs, info->thread = NULL; psinfo = kmalloc(sizeof(*psinfo), GFP_KERNEL); - fill_note(&info->psinfo, "CORE", NT_PRPSINFO, sizeof(*psinfo), psinfo); - if (psinfo == NULL) return 0; + fill_note(&info->psinfo, "CORE", NT_PRPSINFO, sizeof(*psinfo), psinfo); + /* * Figure out how many notes we're going to need for each thread. */ |