Language: C
Label: safe
CWE: CWE-416 \u2014 Use After Free
Referencing memory after it has been freed can cause a program to crash, use unexpected values, or execute code.

Code:
static void srtp_on_destroy(void *arg)
{
    transport_srtp *srtp = (transport_srtp*)arg;

    PJ_LOG(4, (srtp->pool->obj_name, "SRTP transport destroyed"));

    pj_lock_destroy(srtp->mutex);
    pj_pool_safe_release(&srtp->pool);
}