ima: store address of template_fmt_copy in a pointer before calling strsep
This patch stores the address of the 'template_fmt_copy' variable in a new variable, called 'template_fmt_ptr', so that the latter is passed as an argument of strsep() instead of the former. This modification is needed in order to correctly free the memory area referenced by 'template_fmt_copy' (strsep() modifies the pointer of the passed string). Signed-off-by: NRoberto Sassu <roberto.sassu@polito.it> Reported-by: NSebastian Ott <sebott@linux.vnet.ibm.com> Signed-off-by: NMimi Zohar <zohar@us.ibm.com> Signed-off-by: NJames Morris <james.l.morris@oracle.com>
Showing
想要评论请 注册 或 登录