From owner-svn-src-all@FreeBSD.ORG Thu May 21 13:21:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2A22C2F0; Thu, 21 May 2015 13:21:04 +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 17B941BEF; Thu, 21 May 2015 13:21:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t4LDL35q095184; Thu, 21 May 2015 13:21:03 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t4LDL35I095183; Thu, 21 May 2015 13:21:03 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201505211321.t4LDL35I095183@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Thu, 21 May 2015 13:21:03 +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: r283229 - stable/10/usr.sbin/autofs X-SVN-Group: stable-10 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: Thu, 21 May 2015 13:21:04 -0000 Author: trasz Date: Thu May 21 13:21:03 2015 New Revision: 283229 URL: https://svnweb.freebsd.org/changeset/base/283229 Log: MFC r279808: Fix memory leak. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/autofs/common.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/autofs/common.c ============================================================================== --- stable/10/usr.sbin/autofs/common.c Thu May 21 13:19:44 2015 (r283228) +++ stable/10/usr.sbin/autofs/common.c Thu May 21 13:21:03 2015 (r283229) @@ -615,9 +615,11 @@ node_options_x(const struct node *n, cha { char *options; + if (n == NULL) + return (x); + options = separated_concat(x, n->n_options, ','); - if (n->n_parent == NULL) - return (options); + free(x); return (node_options_x(n->n_parent, options)); }