Update Linked list.c

add memory protection.