>
>Please try the following modifications:
>
>diff --git a/kernel/time/posix-clock.c b/kernel/time/posix-clock.c index 9de66bbbb3d1..71d9d8c394fa 100644
>--- a/kernel/time/posix-clock.c
>+++ b/kernel/time/posix-clock.c
>@@ -137,6 +137,8 @@ static int posix_clock_open(struct inode *inode, struct file *fp)
>
> if (!err) {
> get_device(clk->dev);
>+ } else {
>+ kfree(pccontext);
> }
> out:
> up_read(&clk->rwsem);
I tested it, it was all right and fixed the memory leak.
Thanks.