From owner-svn-src-all@freebsd.org Tue Mar 20 00:16:25 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 88862F56E2B; Tue, 20 Mar 2018 00:16:25 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 334576DBD9; Tue, 20 Mar 2018 00:16:25 +0000 (UTC) (envelope-from cem@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 mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2C8A41571B; Tue, 20 Mar 2018 00:16:25 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w2K0GPjq023916; Tue, 20 Mar 2018 00:16:25 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w2K0GPYH023915; Tue, 20 Mar 2018 00:16:25 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201803200016.w2K0GPYH023915@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: Conrad Meyer Date: Tue, 20 Mar 2018 00:16:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r331230 - head/contrib/blacklist/bin X-SVN-Group: head X-SVN-Commit-Author: cem X-SVN-Commit-Paths: head/contrib/blacklist/bin X-SVN-Commit-Revision: 331230 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Mar 2018 00:16:25 -0000 Author: cem Date: Tue Mar 20 00:16:24 2018 New Revision: 331230 URL: https://svnweb.freebsd.org/changeset/base/331230 Log: blacklist: Fix minor memory leak in configuration parsing error case Ordinarily, the continue clause of the for-loop would free 'line.' In this case we instead return early, missing the free. Add an explicit free to avoid the leak. Reported by: Coverity Sponsored by: Dell EMC Isilon Modified: head/contrib/blacklist/bin/conf.c Modified: head/contrib/blacklist/bin/conf.c ============================================================================== --- head/contrib/blacklist/bin/conf.c Tue Mar 20 00:03:49 2018 (r331229) +++ head/contrib/blacklist/bin/conf.c Tue Mar 20 00:16:24 2018 (r331230) @@ -1119,6 +1119,7 @@ conf_parse(const char *f) confset_free(&lc); confset_free(&rc); fclose(fp); + free(line); return; } }