From owner-svn-src-stable-10@freebsd.org Tue Dec 1 07:16:07 2015 Return-Path: Delivered-To: svn-src-stable-10@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 27E2BA3DCAB; Tue, 1 Dec 2015 07:16:07 +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 EA96B1911; Tue, 1 Dec 2015 07:16:06 +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 tB17G63g044085; Tue, 1 Dec 2015 07:16:06 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tB17G6Xl044084; Tue, 1 Dec 2015 07:16:06 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201512010716.tB17G6Xl044084@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:16:06 +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: r291572 - stable/10/lib/libc/stdio 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-10@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Dec 2015 07:16:07 -0000 Author: ngie Date: Tue Dec 1 07:16:05 2015 New Revision: 291572 URL: https://svnweb.freebsd.org/changeset/base/291572 Log: MFC r269326: r269326 (by n_hibma): Fix the example: free the memory that was allocated by getline(). Modified: stable/10/lib/libc/stdio/getline.3 Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/stdio/getline.3 ============================================================================== --- stable/10/lib/libc/stdio/getline.3 Tue Dec 1 06:51:59 2015 (r291571) +++ stable/10/lib/libc/stdio/getline.3 Tue Dec 1 07:16:05 2015 (r291572) @@ -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