static void xs_destroy (XMLSource* xs) { GError* error = NULL; g_return_if_fail(xs != NULL); /* do this first in case we're in a "fast cleanup just before exit" situation */ if (xs->lock != NULL && !gconf_release_lock(xs->lock, &error)) { gconf_log (GCL_ERR, _("Failed to give up lock on XML directory \"%s\": %s"), xs->root_dir, error->message); g_error_free(error); error = NULL; } if (!g_source_remove(xs->timeout_id)) { /* should not happen, don't translate */ gconf_log(GCL_ERR, "timeout not found to remove?"); } cache_unref(xs->cache); g_free(xs->root_dir); g_free(xs); }
static int tailcall_frame_sniffer (const struct frame_unwind *self, struct frame_info *this_frame, void **this_cache) { struct frame_info *next_frame; int next_levels; struct tailcall_cache *cache; /* Inner tail call element does not make sense for a sentinel frame. */ next_frame = get_next_frame (this_frame); if (next_frame == NULL) return 0; cache = cache_find (next_frame); if (cache == NULL) return 0; cache_ref (cache); next_levels = existing_next_levels (this_frame, cache); /* NEXT_LEVELS is -1 only in dwarf2_tailcall_sniffer_first. */ gdb_assert (next_levels >= 0); gdb_assert (next_levels <= cache->chain_levels); if (next_levels == cache->chain_levels) { cache_unref (cache); return 0; } *this_cache = cache; return 1; }
static void tailcall_frame_dealloc_cache (struct frame_info *self, void *this_cache) { struct tailcall_cache *cache = this_cache; cache_unref (cache); }