lsm: s/lsm_init/lsm_init_static/g

Make it clear that there is nothing to free here. Signed-off-by: 's avatarChristian Brauner <christian.brauner@ubuntu.com>
parent 677e1d27
......@@ -120,7 +120,7 @@ static int get_attach_context(struct attach_context *ctx,
if (!found)
return log_error_errno(-ENOENT, ENOENT, "Failed to read capability bounding set from %s", proc_fn);
ctx->lsm_ops = lsm_init();
ctx->lsm_ops = lsm_init_static();
ctx->lsm_label = ctx->lsm_ops->process_label_get(ctx->lsm_ops, ctx->init_pid);
ctx->ns_inherited = 0;
......
......@@ -21,7 +21,7 @@ __hidden extern struct lsm_ops *lsm_apparmor_ops_init(void);
__hidden extern struct lsm_ops *lsm_selinux_ops_init(void);
__hidden extern struct lsm_ops *lsm_nop_ops_init(void);
struct lsm_ops *lsm_init(void)
struct lsm_ops *lsm_init_static(void)
{
struct lsm_ops *ops = NULL;
......
......@@ -33,6 +33,6 @@ struct lsm_ops {
int (*process_label_set_at)(struct lsm_ops *ops, int label_fd, const char *label, bool on_exec);
};
__hidden extern struct lsm_ops *lsm_init(void);
__hidden extern struct lsm_ops *lsm_init_static(void);
#endif /* __LXC_LSM_H */
......@@ -728,7 +728,7 @@ int lxc_init(const char *name, struct lxc_handler *handler)
if (status_fd < 0)
return log_error_errno(-1, errno, "Failed to open monitor status fd");
handler->lsm_ops = lsm_init();
handler->lsm_ops = lsm_init_static();
TRACE("Initialized LSM");
/* Begin by setting the state to STARTING. */
......
......@@ -400,7 +400,7 @@ int main(int argc, char *argv[])
(void)strlcpy(template, P_tmpdir"/attach_XXXXXX", sizeof(template));
lsm_ops = lsm_init();
lsm_ops = lsm_init_static();
i = lxc_make_tmpfile(template, false);
if (i < 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment