diff options
author | Patrick Latifi <pat@cvs.openbsd.org> | 2005-02-27 14:26:01 +0000 |
---|---|---|
committer | Patrick Latifi <pat@cvs.openbsd.org> | 2005-02-27 14:26:01 +0000 |
commit | e1c14d69c938379d2de6883f28a04456f073a4bb (patch) | |
tree | 47af6783fa20e620047369ef2cb1a9c3680f3494 /sbin | |
parent | f7ffc60336c3b29374bb88ce7073a563594ed2dc (diff) |
cleanup correctly in some error paths.
ok hshoexer
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/isakmpd/pf_key_v2.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sbin/isakmpd/pf_key_v2.c b/sbin/isakmpd/pf_key_v2.c index 270646025da..f081eef03aa 100644 --- a/sbin/isakmpd/pf_key_v2.c +++ b/sbin/isakmpd/pf_key_v2.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_key_v2.c,v 1.153 2005/02/27 13:12:12 hshoexer Exp $ */ +/* $OpenBSD: pf_key_v2.c,v 1.154 2005/02/27 14:26:00 pat Exp $ */ /* $EOM: pf_key_v2.c,v 1.79 2000/12/12 00:33:19 niklas Exp $ */ /* @@ -176,10 +176,11 @@ pf_key_v2_register_sa_seq(u_int8_t *spi, size_t sz, u_int8_t proto, return 1; cleanup: - if (node->dst) - free(node->dst); - if (node) + if (node) { + if (node->spi) + free(node->spi); free(node); + } return 0; } |