Fix memory leak.
MFC after: 1 month Sponsored by: The FreeBSD Foundation
This commit is contained in:
parent
5585582d14
commit
8f0eba6738
@ -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));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user