Date: Mon, 12 Dec 2016 02:22:49 +0000 (UTC) From: Xin LI <delphij@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r309870 - stable/10/usr.sbin/ctld Message-ID: <201612120222.uBC2MnBv070019@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: delphij Date: Mon Dec 12 02:22:49 2016 New Revision: 309870 URL: https://svnweb.freebsd.org/changeset/base/309870 Log: MFC r309241,309243: Plug memory leaks. Modified: stable/10/usr.sbin/ctld/ctld.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ctld/ctld.c ============================================================================== --- stable/10/usr.sbin/ctld/ctld.c Mon Dec 12 02:21:56 2016 (r309869) +++ stable/10/usr.sbin/ctld/ctld.c Mon Dec 12 02:22:49 2016 (r309870) @@ -400,6 +400,7 @@ auth_portal_new(struct auth_group *ag, c return (ap); error: + free(str); free(ap); log_errx(1, "Incorrect initiator portal '%s'", portal); return (NULL); @@ -673,8 +674,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?201612120222.uBC2MnBv070019>