From owner-svn-src-all@FreeBSD.ORG Sun Jan 26 07:20:33 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1F9FDEFB; Sun, 26 Jan 2014 07:20:33 +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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0C473105E; Sun, 26 Jan 2014 07:20:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id s0Q7KWY3002836; Sun, 26 Jan 2014 07:20:32 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id s0Q7KWvT002835; Sun, 26 Jan 2014 07:20:32 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201401260720.s0Q7KWvT002835@svn.freebsd.org> From: Kevin Lo Date: Sun, 26 Jan 2014 07:20:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261181 - head/bin/pax 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.17 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: Sun, 26 Jan 2014 07:20:33 -0000 Author: kevlo Date: Sun Jan 26 07:20:32 2014 New Revision: 261181 URL: http://svnweb.freebsd.org/changeset/base/261181 Log: Stop the options string leak if it is not attached into the options linked list. Obtained from: OpenBSD Modified: head/bin/pax/options.c Modified: head/bin/pax/options.c ============================================================================== --- head/bin/pax/options.c Sun Jan 26 04:57:58 2014 (r261180) +++ head/bin/pax/options.c Sun Jan 26 07:20:32 2014 (r261181) @@ -1385,6 +1385,7 @@ opt_add(const char *str) free(lstr); return(-1); } + lstr = NULL; /* parts of string going onto the OPLIST */ *pt++ = '\0'; opt->name = frpt; opt->value = pt; @@ -1400,6 +1401,7 @@ opt_add(const char *str) optail->fow = opt; optail = opt; } + free(lstr); return(0); }