void uhttp_client_destroy()

in src/uhttp.c [1122:1140]


void uhttp_client_destroy(HTTP_CLIENT_HANDLE handle)
{
    /* Codes_SRS_UHTTP_07_004: [ If handle is NULL then uhttp_client_destroy shall do nothing ] */
    if (handle != NULL)
    {
        /* Codes_SRS_UHTTP_07_005: [uhttp_client_destroy shall free any resource that is allocated in this translation unit] */
        if(handle->host_name != NULL)
        {
            free(handle->host_name);
            handle->host_name = NULL;
        }
        singlylinkedlist_destroy(handle->data_list);
        xio_destroy(handle->xio_handle);
        free(handle->certificate);
        free(handle->x509_pk);
        free(handle->x509_cert);
        free(handle);
    }
}