the malloc error returns when I call the my function repeated times in a doctest. only one warning this time.
Sorry, I can't reproduce that. Could you send the code that triggers the warning to the list so that I can check it? Or, even better, could you try to cut it down to a simpler test case that shows the same problems? Stefan