From owner-svn-src-all@freebsd.org Tue Dec 1 07:33:32 2015 Return-Path: Delivered-To: svn-src-all@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 3FF22A3DDCC; Tue, 1 Dec 2015 07:33:32 +0000 (UTC) (envelope-from ngie@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 08E56175D; Tue, 1 Dec 2015 07:33:31 +0000 (UTC) (envelope-from ngie@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tB17XVNH049765; Tue, 1 Dec 2015 07:33:31 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB17XV9m049764; Tue, 1 Dec 2015 07:33:31 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201512010733.tB17XV9m049764@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 1 Dec 2015 07:33:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r291574 - stable/9/lib/libc/stdio X-SVN-Group: stable-9 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.20 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, 01 Dec 2015 07:33:32 -0000 Author: ngie Date: Tue Dec 1 07:33:30 2015 New Revision: 291574 URL: https://svnweb.freebsd.org/changeset/base/291574 Log: MFstable/10 r291572: MFC r269326: r269326 (by n_hibma): Fix the example: free the memory that was allocated by getline(). Modified: stable/9/lib/libc/stdio/getline.3 Directory Properties: stable/9/ (props changed) stable/9/lib/ (props changed) stable/9/lib/libc/ (props changed) Modified: stable/9/lib/libc/stdio/getline.3 ============================================================================== --- stable/9/lib/libc/stdio/getline.3 Tue Dec 1 07:32:35 2015 (r291573) +++ stable/9/lib/libc/stdio/getline.3 Tue Dec 1 07:33:30 2015 (r291574) @@ -95,6 +95,7 @@ size_t linecap = 0; ssize_t linelen; while ((linelen = getline(&line, &linecap, fp)) > 0) fwrite(line, linelen, 1, stdout); +free(line); .Ed .Sh COMPATIBILITY Many application writers used the name