From owner-svn-src-stable@freebsd.org Mon Dec 12 02:22:50 2016 Return-Path: Delivered-To: svn-src-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A08A4C732A1; Mon, 12 Dec 2016 02:22:50 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6FC45CB3; Mon, 12 Dec 2016 02:22:50 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBC2Mn4j070020; Mon, 12 Dec 2016 02:22:49 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBC2MnBv070019; Mon, 12 Dec 2016 02:22:49 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201612120222.uBC2MnBv070019@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Mon, 12 Dec 2016 02:22:49 +0000 (UTC) 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 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Dec 2016 02:22:50 -0000 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] == ':') {