[LCP]Segmentation Faults when calling free()

Buddy Lumpkin b.lumpkin at attbi.com
Thu Feb 20 13:58:02 UTC 2003


You are passing a pointer to free() that is no longer pointing to the
beginning of an anonymous memory segment that was obtained with
malloc(), or it has previously been freed.

It's much easier to help you, if you paste the relevant snippet of code
in an email.

--Buddy

-----Original Message-----
From: linuxcprogramming-admin at lists.linux.org.au
[mailto:linuxcprogramming-admin at lists.linux.org.au] On Behalf Of Chuck
Martin
Sent: Wednesday, February 19, 2003 8:44 PM
To: Linux C Programming
Subject: [LCP]Segmentation Faults when calling free()

Could someone tell me what might cause free() to segfault?  I've
verified that the memory has been previously allocated (using malloc()),
the correct pointer is being passed to free(), and the memory hasn't
already been freed with a previous call to free(), so what else could
it be?

Chuck

_______________________________________________
This is the Linux C Programming List
:  http://lists.linux.org.au/listinfo/linuxcprogramming List




More information about the linuxCprogramming mailing list