Re [robust-futex-2] : interdiff for memory leak fix

From: david singleton
Date: Mon Jan 16 2006 - 14:07:59 EST



Here is an interdiff for a memory leak fix in register_futex. The nice thing
about the slab caches are the ability to spot leaks easily.

diff -u linux-2.6.15/kernel/futex.c linux-2.6.15/kernel/futex.c
--- linux-2.6.15/kernel/futex.c
+++ linux-2.6.15/kernel/futex.c
@@ -1129,6 +1133,8 @@
if (vma->vm_file && vma->vm_file->f_mapping) {
if (vma->vm_file->f_mapping->robust_head == NULL)
init_robust_list(vma->vm_file->f_mapping, file_futex);
+ else
+ kmem_cache_free(file_futex_cachep, file_futex);
head = &vma->vm_file->f_mapping->robust_head->robust_list;
sem = &vma->vm_file->f_mapping->robust_head->robust_sem;
} else {

although Safari seems to always translates tabs to spaces.

David

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/