struct cgroup_rule *newrule = NULL;
/* Structure to get GID from group name */
- struct group *grp = NULL;
+ struct group *grp;
/* Structure to get UID from user name */
- struct passwd *pwd = NULL;
+ struct passwd *pwd;
/* Temporary storage for a configuration rule */
char key[CGROUP_RULE_MAXKEY] = { '\0' };
continue;
}
+ /* clear the buffer. */
+ grp = NULL;
+ pwd = NULL;
+
/*
* If there is something left, it should be a rule. Otherwise,
* there's an error in the configuration file.
for (i = 0; lst->tail->controllers[i]; i++)
cgroup_dbg(" %s", lst->tail->controllers[i]);
cgroup_dbg("\n");
-
- /* Finally, clear the buffer. */
- grp = NULL;
- pwd = NULL;
}
/* If we make it here, there were no errors. */