From 0db253af89c38de2da339e0bcf96c2fa47315de6 Mon Sep 17 00:00:00 2001 From: Moritz Jodeit Date: Sun, 22 Apr 2007 11:34:37 +0000 Subject: Free allocated node in conf_set_now() before failing, so we do not leak memory. ok hshoexer@ --- sbin/isakmpd/conf.c | 6 ++---- 1 file 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; } -- cgit v1.2.3