[PATCH] use kzalloc and kcalloc in core fs code
[linux-2.6-block.git] / fs / binfmt_elf.c
index c2eac2a50bd266889786d9eb825fdb96fa1e2d19..61c21e7dc95d62b55225aa46c76ba2d661873c1d 100644 (file)
@@ -1465,12 +1465,11 @@ static int elf_core_dump(long signr, struct pt_regs * regs, struct file * file)
                read_lock(&tasklist_lock);
                do_each_thread(g,p)
                        if (current->mm == p->mm && current != p) {
-                               tmp = kmalloc(sizeof(*tmp), GFP_ATOMIC);
+                               tmp = kzalloc(sizeof(*tmp), GFP_ATOMIC);
                                if (!tmp) {
                                        read_unlock(&tasklist_lock);
                                        goto cleanup;
                                }
-                               memset(tmp, 0, sizeof(*tmp));
                                INIT_LIST_HEAD(&tmp->list);
                                tmp->thread = p;
                                list_add(&tmp->list, &thread_list);