Make it clear that there is nothing to free here.
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
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;
__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;
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 */
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. */
(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) {