Signed-off-by: Dwight Engen <dwight.en...@oracle.com>
---
 src/lxc/cgroup.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/lxc/cgroup.c b/src/lxc/cgroup.c
index a8ae8c1..c2f0a2d 100644
--- a/src/lxc/cgroup.c
+++ b/src/lxc/cgroup.c
@@ -551,7 +551,7 @@ out:
 
 static int in_cgroup_list(char *s, char *list)
 {
-       char *token, *str, *saveptr;
+       char *token, *str, *saveptr = NULL;
 
        if (!list || !s)
                return 0;
@@ -566,7 +566,7 @@ static int in_cgroup_list(char *s, char *list)
 
 static int have_visited(char *opts, char *visited, char *allcgroups)
 {
-       char *str, *s, *token;
+       char *str, *s = NULL, *token;
 
        for (str = strdupa(opts); (token = strtok_r(str, ",", &s)); str = NULL) 
{
                if (!in_cgroup_list(token, allcgroups))
@@ -580,7 +580,7 @@ static int have_visited(char *opts, char *visited, char 
*allcgroups)
 
 static int record_visited(char *opts, char **visitedp, char *allcgroups)
 {
-       char *s, *token, *str;
+       char *s = NULL, *token, *str;
        int oldlen, newlen, ret;
 
        for (str = strdupa(opts); (token = strtok_r(str, ",", &s)); str = NULL) 
{
-- 
1.7.1


------------------------------------------------------------------------------
AlienVault Unified Security Management (USM) platform delivers complete
security visibility with the essential security capabilities. Easily and
efficiently configure, manage, and operate all of your security controls
from a single console and one unified framework. Download a free trial.
http://p.sf.net/sfu/alienvault_d2d
_______________________________________________
Lxc-devel mailing list
Lxc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-devel

Reply via email to