Remove a double free that was making a posterior test fail.

glibc should be able to detect this double free. So, glib is bugged.
Add extra flags to debug and release modes.