Slab allocators: consistent ZERO_SIZE_PTR support and NULL result semantics
[linux-2.6.git] / mm / util.c
index 18396ea..f2f21b7 100644 (file)
--- a/mm/util.c
+++ b/mm/util.c
@@ -76,7 +76,7 @@ void *krealloc(const void *p, size_t new_size, gfp_t flags)
 
        if (unlikely(!new_size)) {
                kfree(p);
-               return NULL;
+               return ZERO_SIZE_PTR;
        }
 
        ks = ksize(p);