Date: Mon, 28 Nov 2016 07:33:26 +0000 (UTC) From: Xin LI <delphij@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309241 - head/usr.sbin/ctld Message-ID: <201611280733.uAS7XQsM042291@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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] == ':') {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201611280733.uAS7XQsM042291>