modprobe: fix a bug where we were entering endless loop

syslogd: strip trailing '\n' too, not only NULs
This commit is contained in:
Denis Vlasenko
2007-11-06 11:34:03 +00:00
parent 5281630229
commit cb12cb2407
2 changed files with 12 additions and 2 deletions

View File

@@ -791,7 +791,7 @@ static void check_dep(char *mod, struct mod_list_t **head, struct mod_list_t **t
if (*tail)
(*tail)->m_next = find;
find->m_prev = *tail;
/*find->m_next = NULL; - xzalloc did it */
find->m_next = NULL; /* possibly NOT done by xzalloc! */
if (!*head)
*head = find;