projects
/
linux-2.6-microblaze.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
cgroup: Fix memory leak when parsing multiple source parameters
[linux-2.6-microblaze.git]
/
kernel
/
cgroup
/
cgroup-v1.c
diff --git
a/kernel/cgroup/cgroup-v1.c
b/kernel/cgroup/cgroup-v1.c
index
191c329
..
32596fd
100644
(file)
--- a/
kernel/cgroup/cgroup-v1.c
+++ b/
kernel/cgroup/cgroup-v1.c
@@
-908,6
+908,8
@@
int cgroup1_parse_param(struct fs_context *fc, struct fs_parameter *param)
opt = fs_parse(fc, cgroup1_fs_parameters, param, &result);
if (opt == -ENOPARAM) {
if (strcmp(param->key, "source") == 0) {
opt = fs_parse(fc, cgroup1_fs_parameters, param, &result);
if (opt == -ENOPARAM) {
if (strcmp(param->key, "source") == 0) {
+ if (fc->source)
+ return invalf(fc, "Multiple sources not supported");
fc->source = param->string;
param->string = NULL;
return 0;
fc->source = param->string;
param->string = NULL;
return 0;