From: Roberto Sassu Date: Mon, 13 Oct 2014 12:08:41 +0000 (+0200) Subject: ima: allocate field pointers array on demand in template_desc_init_fields() X-Git-Tag: omap-for-v3.19/fixes-rc1~83^2~2^2~7 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1bd7face74391ddfc568b3e638f156da1ed77aa6;p=pandora-kernel.git ima: allocate field pointers array on demand in template_desc_init_fields() The allocation of a field pointers array is moved at the end of template_desc_init_fields() and done only if the value of the 'fields' and 'num_fields' parameters is not NULL. For just validating a template format string, retrieved template field pointers are placed in a temporary array. Changelog: - v3: - do not check in this patch if 'fields' and 'num_fields' are NULL (suggested by Mimi Zohar) Signed-off-by: Roberto Sassu Signed-off-by: Mimi Zohar --- Reading git-diff-tree failed