Skip to content

Commit 652b3c2

Browse files
nepetrustyrussell
authored andcommitted
plugin: fix feature_set allocation
Using `tal_dup_or_null` does not set the tal context to the included bytes array. Luckily we already have a function tha deeply duplicates a `feature_set`: `feature_set_dup` Signed-off-by: Peter Neuroth <[email protected]>
1 parent ea2f760 commit 652b3c2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lightningd/plugin.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1821,7 +1821,7 @@ static const char *plugin_parse_getmanifest_response(const char *buffer,
18211821
}
18221822

18231823
/* Store fset to allow to remove feature bits when init returns disabled */
1824-
plugin->fset = tal_dup_or_null(plugin, struct feature_set, fset);
1824+
plugin->fset = feature_set_dup(plugin, fset);
18251825
} else {
18261826
plugin->fset = NULL;
18271827
}

0 commit comments

Comments
 (0)