This is the same post I replied to at Linuxnewbie.org. I'll give you the answer this time though.
Code:
here_ptr = here_ptr-> link_down;
}while (here_ptr-> link_down != NULL);
Never dereference a NULL pointer.
Code:
here_ptr = here_ptr-> link_down;
if (here_ptr == NULL)
break;
}while (here_ptr-> link_down != NULL);