This has nothing to do with Android, per se.
Calling free(x) when x is NULL is not harmful.
Calling free(x) when x came from malloc() is not harmful.
Calling free(x) twice with the same value of x will surely SIGSEGV.
Calling free(x) with a bad value will likely SIGSEGV.
Note case 3: if you
thank you guys. I really appreciate your advice.
I have debugged by putting this 1 line code right after free(strBuf);
(though there is no repeating free(strBuf)...)
strBuf = NULL;
thank you! :D
2011/3/24 Hari Edo hari@gmail.com
This has nothing to do with Android, per se.
Calling
On Mar 23, 11:41 pm, Dewr wind8...@gmail.com wrote:
thank you guys. I really appreciate your advice.
I have debugged by putting this 1 line code right after free(strBuf);
(though there is no repeating free(strBuf)...)
strBuf = NULL;
If that's all that you changed, and it fixed the
The error usually indicates allocated memory overrun somewhere in the
past.
IMHO you use strlen() on UTF8 string therefore the strcpy() overwrites
the amount of memory allocated by malloc.
Increase the allocation size 5 times to check this theory - if the
problem has gone then you need to review
4 matches
Mail list logo