struct proto_shell_state *state;
state = container_of(p, struct proto_shell_state, teardown_task);
- state->proto.proto_event(&state->proto, IFPEV_DOWN);
+
if (state->l3_dev.dev)
device_remove_user(&state->l3_dev);
+
+ state->proto.proto_event(&state->proto, IFPEV_DOWN);
}
static void
if (attrs[i].type > BLOBMSG_TYPE_LAST)
goto error;
- str_len += strlen(attrs[i].name + 1);
+ str_len += strlen(attrs[i].name) + 1;
}
str_buf = malloc(str_len);