struct rune *dup;
if (taken(rune))
- return (struct rune *)rune;
+ return tal_steal(ctx, (struct rune *)rune);
dup = tal_dup(ctx, struct rune, rune);
dup->restrs = tal_arr(dup, struct rune_restr *, tal_count(rune->restrs));
/* If they provide a unique_id, it goes first. */
if (unique_id) {
if (taken(unique_id))
- rune->unique_id = unique_id;
+ rune->unique_id = tal_steal(rune, unique_id);
else
rune->unique_id = tal_strdup(rune, unique_id);
struct rune_altern *dup;
if (taken(altern))
- return (struct rune_altern *)altern;;
+ return tal_steal(ctx, (struct rune_altern *)altern);
dup = tal(ctx, struct rune_altern);
dup->condition = altern->condition;
dup->fieldname = tal_strdup(dup, altern->fieldname);
size_t num_altern;
if (taken(restr))
- return (struct rune_restr *)restr;
+ return tal_steal(ctx, (struct rune_restr *)restr);
num_altern = tal_count(restr->alterns);
dup = tal(ctx, struct rune_restr);