[pacman-dev] [patch] sync_prepare clean-up II, two memleak fixes