ima: store address of template_fmt_copy in a pointer before calling strsep
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: Roberto Sassu <b795143cf975fac5fdf5062ce277ad815f3aaf8e@polito.it>
Reported-by: Sebastian Ott <34be3ca399e9e73d80098c083a5b58614c3ca6da@linux.vnet.ibm.com>
Signed-off-by: Mimi Zohar <f02992f7c171053741caa6b515d9896745b37477@us.ibm.com>
Signed-off-by: James Morris <bb9ce606a3116cc7a99739bd8e2dd57a2d5b69c1@oracle.com>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs