On Fri, May 31, 2019 at 04:10:08PM -0700, Casey Schaufler wrote: > -void apparmor_release_secctx(char *secdata, u32 seclen) > +void apparmor_release_secctx(struct lsm_context *cp) > { > - kfree(secdata); > + kfree(cp->context); > } Maybe better to have common helper? void lsm_context_clear(struct lsm_context *cp) { kfree(cp->context); cp->context = NULL; cp->len = 0; } -- Kees Cook