gio: Replace g_clear_object() with if()…g_object_unref()