cmdmon: fix initialization of allocated reply slots

The next pointer in the last allocated reply slot was not set. This
could cause a crash when more slots were needed. (the slots are used to
save unacknowledged replies to authenticated commands)
This commit is contained in:
Miroslav Lichvar
2014-09-24 18:20:05 +02:00
parent 1eca83ff22
commit 2ff4eca7bf

View File

@@ -566,6 +566,7 @@ get_more_replies(void)
for (i=1; i<REPLY_EXTEND_QUANTUM; i++) {
new_replies[i-1].next = new_replies + i;
}
new_replies[REPLY_EXTEND_QUANTUM - 1].next = NULL;
free_replies = new_replies;
}
}