summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2015-04-21 01:49:20 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2015-04-21 01:49:20 +0000
commit05980ec6e92294b2cfdcbb07f768970762b69a31 (patch)
tree37e5324d92cee886e6d6cd583cacb29f6bb4703a /usr.sbin
parent60f19b673c0ed71d29b263009199d79b23b714e9 (diff)
fix a memory leak if tls_read() fails. ok henning@
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ntpd/constraint.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.sbin/ntpd/constraint.c b/usr.sbin/ntpd/constraint.c
index 3e41c3ec954..24748712bef 100644
--- a/usr.sbin/ntpd/constraint.c
+++ b/usr.sbin/ntpd/constraint.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: constraint.c,v 1.7 2015/03/14 05:10:11 bcook Exp $ */
+/* $OpenBSD: constraint.c,v 1.8 2015/04/21 01:49:19 jsg Exp $ */
/*
* Copyright (c) 2015 Reyk Floeter <reyk@openbsd.org>
@@ -740,6 +740,7 @@ tls_readline(struct tls *tls, size_t *lenp, size_t *maxlength,
goto again;
if (ret != 0) {
/* SSL read error, ignore */
+ free(buf);
return (NULL);
}