XFRM: Fix memory leak in xfrm_state_update
[linux-2.6.git] / net / xfrm / xfrm_state.c
index d70f85e..9414b9c 100644 (file)
@@ -1345,6 +1345,8 @@ out:
                        xfrm_state_check_expire(x1);
 
                err = 0;
+               x->km.state = XFRM_STATE_DEAD;
+               __xfrm_state_put(x);
        }
        spin_unlock_bh(&x1->lock);