svn commit: r309241 - head/usr.sbin/ctld
Xin LI
delphij at FreeBSD.org
Mon Nov 28 07:33:28 UTC 2016
Author: delphij
Date: Mon Nov 28 07:33:26 2016
New Revision: 309241
URL: https://svnweb.freebsd.org/changeset/base/309241
Log:
Don't leak 'str' when we see a malformed IPv6 address.
MFC after: 2 weeks
Modified:
head/usr.sbin/ctld/ctld.c
Modified: head/usr.sbin/ctld/ctld.c
==============================================================================
--- head/usr.sbin/ctld/ctld.c Mon Nov 28 07:27:08 2016 (r309240)
+++ head/usr.sbin/ctld/ctld.c Mon Nov 28 07:33:26 2016 (r309241)
@@ -675,8 +675,10 @@ parse_addr_port(char *arg, const char *d
*/
arg++;
addr = strsep(&arg, "]");
- if (arg == NULL)
+ if (arg == NULL) {
+ free(str);
return (1);
+ }
if (arg[0] == '\0') {
port = def_port;
} else if (arg[0] == ':') {
More information about the svn-src-head
mailing list