From 6b6a9e9d1fb829cd669d61754c203efd7dbc8d1d Mon Sep 17 00:00:00 2001 From: Kautuk Consul Date: Thu, 12 Jan 2012 17:20:08 -0800 Subject: [PATCH] --- yaml --- r: 284416 b: refs/heads/master c: f1db7afd917e54711798c64d78f8f5fb090f950d h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/mm/vmalloc.c | 9 ++++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index 635b95c09651..a7fcad15ee6e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 3f79768f239746d19accd88da96263ef35d6a219 +refs/heads/master: f1db7afd917e54711798c64d78f8f5fb090f950d diff --git a/trunk/mm/vmalloc.c b/trunk/mm/vmalloc.c index 877ca046f43d..86ce9a526c17 100644 --- a/trunk/mm/vmalloc.c +++ b/trunk/mm/vmalloc.c @@ -2378,7 +2378,7 @@ struct vm_struct **pcpu_get_vm_areas(const unsigned long *offsets, vms = kzalloc(sizeof(vms[0]) * nr_vms, GFP_KERNEL); vas = kzalloc(sizeof(vas[0]) * nr_vms, GFP_KERNEL); if (!vas || !vms) - goto err_free; + goto err_free2; for (area = 0; area < nr_vms; area++) { vas[area] = kzalloc(sizeof(struct vmap_area), GFP_KERNEL); @@ -2476,11 +2476,10 @@ struct vm_struct **pcpu_get_vm_areas(const unsigned long *offsets, err_free: for (area = 0; area < nr_vms; area++) { - if (vas) - kfree(vas[area]); - if (vms) - kfree(vms[area]); + kfree(vas[area]); + kfree(vms[area]); } +err_free2: kfree(vas); kfree(vms); return NULL;