summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal/ribmgr.c
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@intec.ugent.be>2017-01-04 13:19:44 +0100
committerSander Vrijders <sander.vrijders@intec.ugent.be>2017-01-04 13:19:44 +0100
commit3deec9c127fc4f43bc413219a98446764355eccd (patch)
tree75ba4a23b61f1a96086468fec0abf7c53df4201d /src/ipcpd/normal/ribmgr.c
parentab534a1bb9db49fe43a67fb022176cb22a2dda52 (diff)
parentad3b709ba48389731e8e5c3eeb280b8c089099fa (diff)
downloadouroboros-3deec9c127fc4f43bc413219a98446764355eccd.tar.gz
ouroboros-3deec9c127fc4f43bc413219a98446764355eccd.zip
Merged in dstaesse/ouroboros/be-normal-refactor (pull request #334)
ipcpd: Initialize rnodes in ribmgr_ro_create
Diffstat (limited to 'src/ipcpd/normal/ribmgr.c')
-rw-r--r--src/ipcpd/normal/ribmgr.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ipcpd/normal/ribmgr.c b/src/ipcpd/normal/ribmgr.c
index d0bd3ec7..e52db08a 100644
--- a/src/ipcpd/normal/ribmgr.c
+++ b/src/ipcpd/normal/ribmgr.c
@@ -315,9 +315,9 @@ static struct rnode * ribmgr_ro_create(const char * name,
char * saveptr = NULL;
char * token = NULL;
char * token2;
- struct rnode * node;
- struct rnode * new;
- struct rnode * prev;
+ struct rnode * node = NULL;
+ struct rnode * new = NULL;
+ struct rnode * prev = NULL;
bool sibling = false;
int timeout;
@@ -354,6 +354,7 @@ static struct rnode * ribmgr_ro_create(const char * name,
}
assert(token);
+ assert(prev);
token2 = strtok_r(NULL, PATH_DELIMITER, &saveptr);
if (token2 != NULL) {