]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - mm/slab.c
Slab: Fix memory leak in fallback_alloc()
[linux-2.6-omap-h63xx.git] / mm / slab.c
index 06236e4ddc1b99686d64683865ca648ed2f79864..046607f05f3eb16414538201836c6e605135b0e8 100644 (file)
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -3263,9 +3263,12 @@ retry:
 
                if (cpuset_zone_allowed_hardwall(zone, flags) &&
                        cache->nodelists[nid] &&
-                       cache->nodelists[nid]->free_objects)
+                       cache->nodelists[nid]->free_objects) {
                                obj = ____cache_alloc_node(cache,
                                        flags | GFP_THISNODE, nid);
+                               if (obj)
+                                       break;
+               }
        }
 
        if (!obj) {