On Sat, Nov 24, 2007 at 02:00:53PM +0100, Nagy Gabor wrote:
Good catches!
* in _alpm_sync_prepare, the deps and asked lists were not freed in case of errors (unresolvable conflicts). Besides the code for handling this case was duplicated.
The good old sync.c: probably you can find more bugs in sync_prepare monster;-) I don't want to hurt anyone, but I couldn't find any concept in sync_prepare [as I said earlier: that looks a bunch of #FS fixes instead]. The asked list is totally needless for example...
So I suggest again rewriting it from scratch (with or without using my pending patches) <- it is easier then review the current code imho.
You're right, trying to fix a little memleak in this messy code doesn't help much, but it didn't require much efforts either. I wasn't trying to review this function anyway. I just ran several pactests with valgrind, and tried to fix all memleaks I could find. One happened to be in that part.