static void cc_web_page_free (web_page_t *wp) /* {{{ */ { if (wp == NULL) return; if (wp->curl != NULL) curl_easy_cleanup (wp->curl); wp->curl = NULL; sfree (wp->instance); sfree (wp->url); sfree (wp->user); sfree (wp->pass); sfree (wp->credentials); sfree (wp->cacert); sfree (wp->post_body); curl_slist_free_all (wp->headers); curl_stats_destroy (wp->stats); sfree (wp->buffer); cc_web_match_free (wp->matches); cc_web_page_free (wp->next); sfree (wp); } /* }}} void cc_web_page_free */
static void cj_free (void *arg) /* {{{ */ { cj_t *db; DEBUG ("curl_json plugin: cj_free (arg = %p);", arg); db = (cj_t *) arg; if (db == NULL) return; if (db->curl != NULL) curl_easy_cleanup (db->curl); db->curl = NULL; if (db->tree != NULL) cj_tree_free (db->tree); db->tree = NULL; sfree (db->instance); sfree (db->host); sfree (db->sock); sfree (db->url); sfree (db->user); sfree (db->pass); sfree (db->credentials); sfree (db->cacert); sfree (db->post_body); curl_slist_free_all (db->headers); curl_stats_destroy (db->stats); sfree (db); } /* }}} void cj_free */
static void cx_free (void *arg) /* {{{ */ { cx_t *db; size_t i; DEBUG ("curl_xml plugin: cx_free (arg = %p);", arg); db = (cx_t *) arg; if (db == NULL) return; if (db->curl != NULL) curl_easy_cleanup (db->curl); db->curl = NULL; if (db->list != NULL) cx_list_free (db->list); sfree (db->buffer); sfree (db->instance); sfree (db->host); sfree (db->url); sfree (db->user); sfree (db->pass); sfree (db->credentials); sfree (db->cacert); sfree (db->post_body); curl_slist_free_all (db->headers); curl_stats_destroy (db->stats); for (i = 0; i < db->namespaces_num; i++) { sfree (db->namespaces[i].prefix); sfree (db->namespaces[i].url); } sfree (db->namespaces); sfree (db); } /* }}} void cx_free */