diff --git a/lib/nodes/socket.c b/lib/nodes/socket.c index 2a3f564bf..f57cccbb8 100644 --- a/lib/nodes/socket.c +++ b/lib/nodes/socket.c @@ -87,8 +87,8 @@ int socket_init(struct super_node *sn) if (ret) continue; - list_push(&interfaces, memdup(&j, sizeof(j))); - i = &j; + i = memdup(&j, sizeof(j)); + list_push(&interfaces, i); found: list_push(&i->sockets, s); }