svn commit: r279808 - head/usr.sbin/autofs
Edward Tomasz Napierala
trasz at FreeBSD.org
Mon Mar 9 13:21:01 UTC 2015
Author: trasz
Date: Mon Mar 9 13:21:00 2015
New Revision: 279808
URL: https://svnweb.freebsd.org/changeset/base/279808
Log:
Fix memory leak.
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Modified:
head/usr.sbin/autofs/common.c
Modified: head/usr.sbin/autofs/common.c
==============================================================================
--- head/usr.sbin/autofs/common.c Mon Mar 9 13:00:59 2015 (r279807)
+++ head/usr.sbin/autofs/common.c Mon Mar 9 13:21:00 2015 (r279808)
@@ -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