Changeset View
Changeset View
Standalone View
Standalone View
sys/netpfil/pf/if_pfsync.c
Show First 20 Lines • Show All 618 Lines • ▼ Show 20 Lines | cleanup: | ||||
if (skw != NULL) | if (skw != NULL) | ||||
uma_zfree(V_pf_state_key_z, skw); | uma_zfree(V_pf_state_key_z, skw); | ||||
if (sks != NULL) | if (sks != NULL) | ||||
uma_zfree(V_pf_state_key_z, sks); | uma_zfree(V_pf_state_key_z, sks); | ||||
cleanup_state: /* pf_state_insert() frees the state keys. */ | cleanup_state: /* pf_state_insert() frees the state keys. */ | ||||
if (st) { | if (st) { | ||||
for (int i = 0; i < 2; i++) { | for (int i = 0; i < 2; i++) { | ||||
if (st->packets[i] != NULL) | |||||
counter_u64_free(st->packets[i]); | counter_u64_free(st->packets[i]); | ||||
if (st->bytes[i] != NULL) | |||||
counter_u64_free(st->bytes[i]); | counter_u64_free(st->bytes[i]); | ||||
} | } | ||||
if (st->dst.scrub) | if (st->dst.scrub) | ||||
uma_zfree(V_pf_state_scrub_z, st->dst.scrub); | uma_zfree(V_pf_state_scrub_z, st->dst.scrub); | ||||
if (st->src.scrub) | if (st->src.scrub) | ||||
uma_zfree(V_pf_state_scrub_z, st->src.scrub); | uma_zfree(V_pf_state_scrub_z, st->src.scrub); | ||||
uma_zfree(V_pf_state_z, st); | uma_zfree(V_pf_state_z, st); | ||||
} | } | ||||
return (error); | return (error); | ||||
▲ Show 20 Lines • Show All 1,927 Lines • Show Last 20 Lines |