Hi Everyone,
I am stuck at removing element from linked list. The error I get while compiling under linux is:
Error I get from windows is:*** glibc detected *** free(): invalid next size (fast): 0x0804a028 ***
The structure and function that I use to delete are:Windows has triggered a breakpoint in test1.exe.
This may be due to a corruption of the heap, and indicates a bug in test1.exe or any of the DLLs it has loaded.
When such an issue occurs? and what does it mean ?Code:typedef struct text *aText; struct line { int size; char *text; aText next; aText prev; }; void RemoveNode(aText node) { if (node!=NULL) { free(node->text); node->text=NULL; node->next=NULL; node->prev=NULL; node->size=0; free(node); node=NULL; } }
Regards



LinkBack URL
About LinkBacks


