static void hio_response_http_dispose(GObject *object) { HioResponseHttp *http; http = HIO_RESPONSE_HTTP(object); if (http->header_stream) { g_object_unref(http->header_stream); http->header_stream = NULL; } if (http->body_stream) { g_object_unref(http->body_stream); http->body_stream = NULL; } while (http->headers != NULL) { header_free(http->headers->data); http->headers = g_slist_delete_link(http->headers, http->headers); } G_OBJECT_CLASS(hio_response_http_parent_class)->dispose(object); }
void client_free (Client *client) { if (client == NULL) return; if (client->file) { fflush (client->file); fclose (client->file); client->file = NULL; } oml_free (client->file_name); oml_free (client->downstream_addr); struct header *header = client->headers; while (header) { struct header *next = header->next; header_free (header); header = next; } msg_queue_destroy (client->messages); cbuf_destroy (client->cbuf); pthread_cond_destroy (&client->condvar); pthread_mutex_destroy (&client->mutex); socket_free (client->recv_socket); oml_free (client); }
void pa_headerlist_free(pa_headerlist* p) { struct header *hdr; while ((hdr = pa_hashmap_steal_first(MAKE_HASHMAP(p)))) header_free(hdr); pa_hashmap_free(MAKE_HASHMAP(p), NULL, NULL); }
/** * Destroy header object and nullify pointer holding it. */ void header_free_null(header_t **o_ptr) { header_t *o = *o_ptr; if (o != NULL) { header_free(o); *o_ptr = NULL; } }
static void ffmpeg_mux_free(struct ffmpeg_mux *ffm) { if (ffm->initialized) { av_write_trailer(ffm->output); } free_avformat(ffm); header_free(&ffm->video_header); if (ffm->audio_header) { for (int i = 0; i < ffm->params.tracks; i++) { header_free(&ffm->audio_header[i]); } free(ffm->audio_header); } if (ffm->audio) { free(ffm->audio); } memset(ffm, 0, sizeof(*ffm)); }
/** * Frees all allocations in the node, including the header and message * structure. * * @param type(ws_client*) n [Client] */ void client_free(ws_client *n) { if (n->client_ip != NULL) { free(n->client_ip); n->client_ip = NULL; } if (n->string != NULL) { free(n->string); n->string = NULL; } if (n->headers != NULL) { header_free(n->headers); free(n->headers); n->headers = NULL; } if (n->message != NULL) { message_free(n->message); free(n->message); n->message = NULL; } }
void response_free(Response response) { header_free(response->header); free(response->content); free(response); }
void request_free(Request request) { header_free(request->header); free(request); }