|
@@ -1374,8 +1374,10 @@ static ssize_t nr_hugepages_store_common(bool obey_mempolicy,
|
|
NODEMASK_ALLOC(nodemask_t, nodes_allowed, GFP_KERNEL | __GFP_NORETRY);
|
|
NODEMASK_ALLOC(nodemask_t, nodes_allowed, GFP_KERNEL | __GFP_NORETRY);
|
|
|
|
|
|
err = strict_strtoul(buf, 10, &count);
|
|
err = strict_strtoul(buf, 10, &count);
|
|
- if (err)
|
|
|
|
|
|
+ if (err) {
|
|
|
|
+ NODEMASK_FREE(nodes_allowed);
|
|
return 0;
|
|
return 0;
|
|
|
|
+ }
|
|
|
|
|
|
h = kobj_to_hstate(kobj, &nid);
|
|
h = kobj_to_hstate(kobj, &nid);
|
|
if (nid == NUMA_NO_NODE) {
|
|
if (nid == NUMA_NO_NODE) {
|