In pf_state_insert(), if the first pf_state_key_attach() fails, the
authordavid <david@openbsd.org>
Thu, 10 Jul 2008 05:44:54 +0000 (05:44 +0000)
committerdavid <david@openbsd.org>
Thu, 10 Jul 2008 05:44:54 +0000 (05:44 +0000)
commit0671dac0cf93e4d07d85872fe5b7f10e117b971f
tree4d145ab9f95d02f7f9917248be8f5b0a5a53224b
parent6d908c528ece43b356c49d0805c8f4e8853a384b
In pf_state_insert(), if the first pf_state_key_attach() fails, the
state key is freed by pf_state_key_attach().  But in the case of NAT,
there are two state keys allocated, so we must free the second key
manually.  Fixes a pf_state_key_pl leak seen in certain cases with
pfsync or with pf state-insert errors.
ok mcbride@ henning@
sys/net/pf.c