From 07bf754cedc8cfd6a0ebe44de9575fe9cedeea95 Mon Sep 17 00:00:00 2001 From: tim Date: Mon, 29 Apr 2019 19:03:20 +0000 Subject: Plug a memory leak in log_debug(); OK okan@ --- util.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'util.c') diff --git a/util.c b/util.c index 624fc13..609f51a 100644 --- a/util.c +++ b/util.c @@ -15,7 +15,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: util.c,v 1.23 2019/02/13 15:43:24 okan Exp $ + * $OpenBSD: util.c,v 1.24 2019/04/29 19:03:20 tim Exp $ */ #include @@ -135,5 +135,6 @@ log_debug(int level, const char *func, const char *msg, ...) va_start(ap, msg); xasprintf(&fmt, "debug%d: %s: %s", level, func, msg); log_msg(fmt, ap); + free(fmt); va_end(ap); } -- cgit v1.2.3-2-gb3c3