Fixes 850393b57bdd7011780f4cf897d4a2467f58a673. Please push to Gerrit. Bonus points for fixing the cast too.
I pushed a patch that replaces g_free with free. Now the problem is that checkAPI doesn't allow free! No way to make petri-dish pass. We can:
checkAPI doesn't allow free because it also doesn't allow malloc; if the malloced memory is coming from library internals somewhere, does the library itself have a cleanup method we could call instead?
- merge without PD
- patch checkAPI to allow some forbidden calls in some files
Is it worth the latter or we should be fine with the former?