Linked List

I'm created a link list of structures. the struct is defined with:
char name[50];
char num[50];
I load this list with X number of names and numbers, but are char based. Then later I go back in the list and search for a number and return the name. Note the names are not the same length, but less than 50. After 22 items have be written to and read from the list it returns a bad name. It inserts "Off" and returns "O%", then it continues perfectly. I've debugged everything and the insert goes fine but when it goes to read the "Off" back out its gets some garbage. I thought this was in indication of a memory leak but I can't find one. What do you think?

All the code shown seems okay. Note however, that memcpy is not able to deal with overlapping memory regions. However, memmove is.

By the way, you could've used strcpy() just as easily or even easier here:

strcpy (l_enum->enum_name, enum_name);

You would get rid of the strlen() call alltogether.

Which brings me to another detail: doing a memcpy() over strlen() bytes does work in this case, but are you aware that you're not copying the terminating '\0' character of the original strings ? Therefore, you would have to add 1 to the result of strlen(), as strlen() counts the characters in the string, excluding the terminating '\0'.

By calling bzero(), you effectively circumvented that problem.

Have you ever noticed the function memset() by the way ? It could be a runtime-library replacement of your bzero() function.