summaryrefslogtreecommitdiff
path: root/src/ipcpd/normal/ribmgr.c
diff options
context:
space:
mode:
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) {