ggit: use proper free functions