Skip to content

rbtree.c中exit函数,释放的有点。。尴尬。。 #4

@yifengyou

Description

@yifengyou

兄弟,rbtree.c中exit函数,释放的有点。。尴尬。。

static void __exit my_exit(void)
{
struct mytype *data;
struct rb_node *node;
printk("The rbtree kernel is exiting!\n");
for (node = rb_first(&mytree); node; ) {
data = rb_entry(node, struct mytype, node);
if (data) {
rb_erase(&data->node, &mytree);
node = rb_next(node);
kfree(data);
}
}
}

Originally posted by @yifengyou in #2 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions