Thanks, Tom...
it really seems that this is the culprit:
I was freeing again already freed memory, which of course
created random crashes later.
I send here rapidly a new patch version.
I really tested the allocation problems by adding
allocation + free'ing of each of the first parameters
used in prim_record_minimal_symbol
and it does seem that freeing of char array doesn't lead to any problem.
So the only trouble was related to the
reallocation of section_data and seems to be fixed
thanks to Tom's proposal.
Yuanhui Zhang,
could you please check if the new patch
suppresses the crash you had when you tried the previous version?
Thanks to everyone...
Pierre Muller