picoquic/tls_api.c
static void picoquic_free_log_event(picoquic_quic_t* quic)
{
    ptls_context_t* ctx = (ptls_context_t*)quic->tls_master_ctx;

    if (ctx->log_event != NULL) {
        struct st_picoquic_log_event_t* picoquic_log_event = (struct st_picoquic_log_event_t*)ctx->log_event;
        if (picoquic_log_event != NULL && picoquic_log_event->fp != NULL) {
            picoquic_file_close(picoquic_log_event->fp);
        }
        free(ctx->log_event);
        ctx->log_event = NULL;
    }
}
/**
 * Free the log-event call back, either when the TLS master context is freed,
 * or when the key log file is reset.
 */
Free the log-event call back, either when the TLS master context is freed,
or when the key log file is reset.
Free the log - event call back either when the TLS master context is freed or when the key log file is reset .
static void picoquic_free_log_event(picoquic_quic_t* quic)
{
    ptls_context_t* ctx = (ptls_context_t*)quic->tls_master_ctx;
    if (ctx->log_event != NULL) {
        struct st_picoquic_log_event_t* picoquic_log_event = (struct st_picoquic_log_event_t*)ctx->log_event;
        if (picoquic_log_event != NULL && picoquic_log_event->fp != NULL) {
            picoquic_file_close(picoquic_log_event->fp);
        }
        free(ctx->log_event);
        ctx->log_event = NULL;
    }
}
static void picoquic_free_log_event ( picoquic_quic_t * quic ) { ptls_context_t * ctx = ( ptls_context_t * ) quic -> tls_master_ctx ; if ( ctx -> log_event != NULL ) { struct st_picoquic_log_event_t * picoquic_log_event = ( struct st_picoquic_log_event_t * ) ctx -> log_event ; if ( picoquic_log_event != NULL && picoquic_log_event -> fp != NULL ) { picoquic_file_close ( picoquic_log_event -> fp ) ; } free ( ctx -> log_event ) ; ctx -> log_event = NULL ; } }
Free the log-event call back, either when the TLS master context is freed,
 or when the key log file is reset.
Free the log - event call back either when the TLS master context is freed or when the key log file is reset .