diff --git a/lightningd/peer_control.c b/lightningd/peer_control.c index 8e79ba346..a74067dc5 100644 --- a/lightningd/peer_control.c +++ b/lightningd/peer_control.c @@ -81,7 +81,7 @@ static void copy_to_parent_log(const char *prefix, struct peer *new_peer(struct lightningd *ld, u64 dbid, const struct pubkey *id, const struct wireaddr_internal *addr, - const u8 *gfeatures, const u8 *lfeatures) + const u8 *gfeatures TAKES, const u8 *lfeatures TAKES) { /* We are owned by our channels, and freed manually by destroy_channel */ struct peer *peer = tal(NULL, struct peer); diff --git a/lightningd/peer_control.h b/lightningd/peer_control.h index 7c5f2530c..4714eeda9 100644 --- a/lightningd/peer_control.h +++ b/lightningd/peer_control.h @@ -58,7 +58,7 @@ struct peer *find_peer_by_dbid(struct lightningd *ld, u64 dbid); struct peer *new_peer(struct lightningd *ld, u64 dbid, const struct pubkey *id, const struct wireaddr_internal *addr, - const u8 *gfeatures, const u8 *lfeatures); + const u8 *gfeatures TAKES, const u8 *lfeatures TAKES); /* Also removes from db. */ void delete_peer(struct peer *peer);