X-Git-Url: https://git.karo-electronics.de/?a=blobdiff_plain;f=fs%2Fbinfmt_elf.c;h=0c42cdbabecff0c4c8d9d0e597273ff4fce79507;hb=1ca22254b32657d65315af261ae0e699b8427fb7;hp=6d7d1647a68c8cf3f8b2c906eb77e23040a49bf5;hpb=fa4c95bfdb85d568ae327d57aa33a4f55bab79c4;p=karo-tx-linux.git diff --git a/fs/binfmt_elf.c b/fs/binfmt_elf.c index 6d7d1647a68c..0c42cdbabecf 100644 --- a/fs/binfmt_elf.c +++ b/fs/binfmt_elf.c @@ -1601,8 +1601,10 @@ static int fill_note_info(struct elfhdr *elf, int phdrs, info->thread = NULL; psinfo = kmalloc(sizeof(*psinfo), GFP_KERNEL); - if (psinfo == NULL) + if (psinfo == NULL) { + info->psinfo.data = NULL; /* So we don't free this wrongly */ return 0; + } fill_note(&info->psinfo, "CORE", NT_PRPSINFO, sizeof(*psinfo), psinfo);