Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 May 2015 13:21:03 +0000 (UTC)
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
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
Message-ID:  <201505211321.t4LDL35I095183@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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));
 }



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201505211321.t4LDL35I095183>