Fix memory leak.

MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
This commit is contained in:
Edward Tomasz Napierala 2015-03-09 13:21:00 +00:00
parent 5585582d14
commit 8f0eba6738

View File

@ -615,9 +615,11 @@ node_options_x(const struct node *n, char *x)
{
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));
}