svn commit: r283229 - stable/10/usr.sbin/autofs

Edward Tomasz Napierala trasz at FreeBSD.org
Thu May 21 13:21:04 UTC 2015


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));
 }


More information about the svn-src-all mailing list