|
From: Tom H. <th...@cy...> - 2004-09-22 14:46:55
|
In message <415...@re...>
Lucas Brasilino <bra...@re...> wrote:
> LinkedList *newLinkedList(void)
> {
> LinkedList *s;
>
> /* memory allocation for LinkedList structure */
> s = (LinkedList *)malloc (sizeof (LinkedList *));
You are only allocating enough memory for a pointer to a LinkedList
here, not for a whole LinkedList structure.
Tom
--
Tom Hughes (th...@cy...)
Software Engineer, Cyberscience Corporation
http://www.cyberscience.com/
|