diff options
-rw-r--r-- | mm/hugetlb.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 7bf223d6677b..8e31cda6fc22 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c | |||
@@ -1374,8 +1374,10 @@ static ssize_t nr_hugepages_store_common(bool obey_mempolicy, | |||
1374 | NODEMASK_ALLOC(nodemask_t, nodes_allowed, GFP_KERNEL | __GFP_NORETRY); | 1374 | NODEMASK_ALLOC(nodemask_t, nodes_allowed, GFP_KERNEL | __GFP_NORETRY); |
1375 | 1375 | ||
1376 | err = strict_strtoul(buf, 10, &count); | 1376 | err = strict_strtoul(buf, 10, &count); |
1377 | if (err) | 1377 | if (err) { |
1378 | NODEMASK_FREE(nodes_allowed); | ||
1378 | return 0; | 1379 | return 0; |
1380 | } | ||
1379 | 1381 | ||
1380 | h = kobj_to_hstate(kobj, &nid); | 1382 | h = kobj_to_hstate(kobj, &nid); |
1381 | if (nid == NUMA_NO_NODE) { | 1383 | if (nid == NUMA_NO_NODE) { |