don't leak memory on g_return_if_fail
open the file a bit later to avoid possible leak on g_return_val_if_fail
allocate memory a bit later to avoid possible leaks
don't leak memory