From: Ivana Hutarova Varekova Date: Wed, 9 Oct 2013 09:14:36 +0000 (+0200) Subject: cgroup_init: stop mntopt parsing if there is a bug in named hierarchy X-Git-Tag: v0.41~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7d9705a5ca92ea25ceab780200109b60e0d27d6e;p=thirdparty%2Flibcgroup.git cgroup_init: stop mntopt parsing if there is a bug in named hierarchy cgroup_init should stop parsing of named hierarchy if there is a bug. Signed-off-by: Ivana Hutarova Varekova Acked-by: Peter Schiffer Acked-by: Dhaval Giani --- diff --git a/src/api.c b/src/api.c index d0eb10a4..f78704af 100644 --- a/src/api.c +++ b/src/api.c @@ -993,6 +993,8 @@ int cgroup_init(void) if (mntopt) { mntopt = strtok_r(mntopt, ",", &strtok_buffer); + if (!mntopt) + continue; /* * Check if it is a duplicate */