Realized this is still bad.If you have 10 SearchEngines and only the last one matches in the parseuri() for loop, you would still have the other 9 allocated.. Getting rid of prefix altogether seams to be the cleanest approach. no need to strdup().
Updated patch attached.
searchengines.patch
Description: Binary data
On 23.09.2009, at 14:05, cryptix wrote:
Hey Nils, like the patch, the unfree()ed prefixes were bugging me, though. Updated it a bit, hope you agree. Kind regards, cryptix <searchengines.patch>