diff options
author | Moritz Jodeit <moritz@cvs.openbsd.org> | 2007-04-22 11:34:37 +0000 |
---|---|---|
committer | Moritz Jodeit <moritz@cvs.openbsd.org> | 2007-04-22 11:34:37 +0000 |
commit | 0db253af89c38de2da339e0bcf96c2fa47315de6 (patch) | |
tree | e79f1af533f42b90f1ce0f78d306b087b6784888 /sbin/isakmpd | |
parent | af7a081d97c7609b75665c1a5c715ca04b55e07d (diff) |
Free allocated node in conf_set_now() before failing,
so we do not leak memory.
ok hshoexer@
Diffstat (limited to 'sbin/isakmpd')
-rw-r--r-- | sbin/isakmpd/conf.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sbin/isakmpd/conf.c b/sbin/isakmpd/conf.c index c72ae09b99a..0d6a1825b4b 100644 --- a/sbin/isakmpd/conf.c +++ b/sbin/isakmpd/conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: conf.c,v 1.94 2007/04/16 13:01:39 moritz Exp $ */ +/* $OpenBSD: conf.c,v 1.95 2007/04/22 11:34:36 moritz Exp $ */ /* $EOM: conf.c,v 1.48 2000/12/04 02:04:29 angelos Exp $ */ /* @@ -186,11 +186,9 @@ conf_set_now(char *section, char *tag, char *value, int override, return 0; fail: free(node->value); - node->value = NULL; free(node->tag); - node->tag = NULL; free(node->section); - node->section = NULL; + free(node); return 1; } |