Re: c code, works on linux, crashes on windows
From: Willem (willem_at_stack.nl)
Date: 02/27/05
- Next message: Virgil: "Re: [XPOST] A unique number for every "person" - can it be done?"
- Previous message: Jerry Gaspard: "c code, works on linux, crashes on windows"
- In reply to: Jerry Gaspard: "c code, works on linux, crashes on windows"
- Next in thread: Percival: "Re: c code, works on linux, crashes on windows"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 27 Feb 2005 19:22:50 +0000 (UTC)
Jerry wrote:
) ...
) free(current);
) }
) temp = current;
) current = current->next;
) ...
)
) that code will run perfect on linux when compiled but under windows
) crashes at the line with the arrow, i am lost as to what is causing it.
) any help would be great.
You're not supposed to use the contents of 'current' after you have
freed it. That it works on linux is dumb luck. Change your code so
it only frees stuff when you're really done with it.
SaSW, Willem
--
Disclaimer: I am in no way responsible for any of the statements
made in the above text. For all I know I might be
drugged or something..
No I'm not paranoid. You all think I'm paranoid, don't you !
#EOT
- Next message: Virgil: "Re: [XPOST] A unique number for every "person" - can it be done?"
- Previous message: Jerry Gaspard: "c code, works on linux, crashes on windows"
- In reply to: Jerry Gaspard: "c code, works on linux, crashes on windows"
- Next in thread: Percival: "Re: c code, works on linux, crashes on windows"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|