From owner-svn-src-all@FreeBSD.ORG Thu Jul 31 08:28:43 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 251994E7; Thu, 31 Jul 2014 08:28:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::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 129F12979; Thu, 31 Jul 2014 08:28:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s6V8Sg6n049702; Thu, 31 Jul 2014 08:28:42 GMT (envelope-from n_hibma@svn.freebsd.org) Received: (from n_hibma@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s6V8Sghg049701; Thu, 31 Jul 2014 08:28:42 GMT (envelope-from n_hibma@svn.freebsd.org) Message-Id: <201407310828.s6V8Sghg049701@svn.freebsd.org> From: Nick Hibma Date: Thu, 31 Jul 2014 08:28:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269326 - head/lib/libc/stdio X-SVN-Group: head 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.18 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: Thu, 31 Jul 2014 08:28:43 -0000 Author: n_hibma Date: Thu Jul 31 08:28:42 2014 New Revision: 269326 URL: http://svnweb.freebsd.org/changeset/base/269326 Log: Fix the example: free the memory that was allocated by getline(). Modified: head/lib/libc/stdio/getline.3 Modified: head/lib/libc/stdio/getline.3 ============================================================================== --- head/lib/libc/stdio/getline.3 Thu Jul 31 08:07:23 2014 (r269325) +++ head/lib/libc/stdio/getline.3 Thu Jul 31 08:28:42 2014 (r269326) @@ -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