diff options
author | 2015-10-06 14:02:25 +0000 | |
---|---|---|
committer | 2015-10-06 14:02:25 +0000 | |
commit | f011c38568207ebfd26e948f629e794f763aca44 (patch) | |
tree | c25bbe42e30e72ebcbba0ec9ac5043b50090a533 | |
parent | only modifies data, stdin to stdout, so tame "stdout" (diff) | |
download | wireguard-openbsd-f011c38568207ebfd26e948f629e794f763aca44.tar.xz wireguard-openbsd-f011c38568207ebfd26e948f629e794f763aca44.zip |
Fix buf leak in error path. ok gilles@ eric@
-rw-r--r-- | usr.sbin/smtpd/table_ldap.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/smtpd/table_ldap.c b/usr.sbin/smtpd/table_ldap.c index 0b9b7451e79..5cc48f76b78 100644 --- a/usr.sbin/smtpd/table_ldap.c +++ b/usr.sbin/smtpd/table_ldap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: table_ldap.c,v 1.13 2015/01/20 17:37:54 deraadt Exp $ */ +/* $OpenBSD: table_ldap.c,v 1.14 2015/10/06 14:02:25 stsp Exp $ */ /* * Copyright (c) 2013 Eric Faurot <eric@openbsd.org> @@ -189,10 +189,10 @@ ldap_connect(const char *addr) if ((buf = strdup(addr)) == NULL) return (NULL); - /* XXX buf leak */ - + /* aldap_parse_url frees buf on success */ if (aldap_parse_url(buf, &lu) != 1) { log_warnx("warn: table-ldap: ldap_parse_url fail"); + free(buf); return (NULL); } |