kernel: close fd early

This commit is contained in:
weishu
2024-04-29 15:53:12 +08:00
parent efbc07fde3
commit 646b6f71f4

View File

@@ -241,6 +241,7 @@ static void do_update_uid(struct work_struct *work)
struct uid_data *data =
kzalloc(sizeof(struct uid_data), GFP_ATOMIC);
if (!data) {
filp_close(fp, 0);
goto out;
}
@@ -264,6 +265,7 @@ static void do_update_uid(struct work_struct *work)
// reset line start
line_start = pos;
}
filp_close(fp, 0);
// now update uid list
struct uid_data *np;
@@ -299,7 +301,6 @@ out:
list_del(&np->list);
kfree(np);
}
filp_close(fp, 0);
}
void track_throne()