mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-03 21:24:22 +01:00
bkpr: duplicate the name, dont steal it
This commit is contained in:
@@ -1,17 +1,18 @@
|
||||
#include "config.h"
|
||||
|
||||
#include <ccan/str/str.h>
|
||||
#include <ccan/tal/str/str.h>
|
||||
#include <common/coin_mvt.h>
|
||||
#include <common/node_id.h>
|
||||
#include <plugins/bkpr/account.h>
|
||||
|
||||
struct account *new_account(const tal_t *ctx,
|
||||
const char *name STEALS,
|
||||
const char *name,
|
||||
struct node_id *peer_id)
|
||||
{
|
||||
struct account *a = tal(ctx, struct account);
|
||||
|
||||
a->name = tal_steal(a, name);
|
||||
a->name = tal_strdup(a, name);
|
||||
a->peer_id = peer_id;
|
||||
a->is_wallet = streq(a->name, WALLET);
|
||||
a->we_opened = false;
|
||||
|
||||
Reference in New Issue
Block a user