mount_cgroup_controllers: expect 2 items from fscanf()

This commit is contained in:
Kay Sievers 2010-11-22 11:06:38 +01:00
parent 6bd2127711
commit 16f6682d0b

View file

@ -140,7 +140,7 @@ static int mount_cgroup_controllers(void) {
char *controller, *where;
int enabled = false;
if (fscanf(f, "%ms %*i %*i %i", &controller, &enabled) != 1) {
if (fscanf(f, "%ms %*i %*i %i", &controller, &enabled) != 2) {
if (feof(f))
break;