kernel: Fix wrong kfree
This commit is contained in:
@@ -153,7 +153,6 @@ FILLDIR_RETURN_TYPE my_actor(struct dir_context *ctx, const char *name,
|
|||||||
if (IS_ERR(file)) {
|
if (IS_ERR(file)) {
|
||||||
pr_err("Failed to open directory: %s, err: %ld\n",
|
pr_err("Failed to open directory: %s, err: %ld\n",
|
||||||
dirpath, PTR_ERR(file));
|
dirpath, PTR_ERR(file));
|
||||||
kfree(dirpath);
|
|
||||||
return FILLDIR_ACTOR_CONTINUE;
|
return FILLDIR_ACTOR_CONTINUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -170,7 +169,6 @@ FILLDIR_RETURN_TYPE my_actor(struct dir_context *ctx, const char *name,
|
|||||||
*my_ctx->stop = 1;
|
*my_ctx->stop = 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
kfree(dirpath);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return FILLDIR_ACTOR_CONTINUE;
|
return FILLDIR_ACTOR_CONTINUE;
|
||||||
|
|||||||
Reference in New Issue
Block a user