DragonFly bugs List (threaded) for 2004-10
Re: cu coredumps
You got the first case AFAIK, but for the second case you are loosing cp
when you assign it to tmp_cp. The possible solutions are:
1. Create new temp holder (in else) for cp and free() it after
2. If you dont want to create a new pointer, swap pointers in plase,
(int)tmp_cp ^= (int)cp; (int)cp ^= (int)tmp_cp; (int)tmp_cp ^= (int)cp;
or something similar :)
On Wed, 27 Oct 2004, Mark Cullen wrote:
Timour Ezeev wrote:
I think you got small memory leak there IMHO (either tmp_cp is not
but allocated or cp is lost).
I think I see what you mean with the tmp_cp allocated but not used. I don't
think I get you on the cp is lost part though. Is the attached better?
Also, where would I put the free() exactly? I forgot about that..