From: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx> Signed-off-by: Jes Sorensen <Jes.Sorensen@xxxxxxxxxx> --- policy.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/policy.c b/policy.c index 7959c97..4908ab6 100644 --- a/policy.c +++ b/policy.c @@ -47,6 +47,11 @@ static void pol_new(struct dev_policy **pol, char *name, const char *val, const char *real_metadata = NULL; int i; + if (!n) { + fprintf(stderr, Name ": %s unable to allocate memory\n", + __func__); + return; + } n->name = name; n->value = val; -- 1.7.6.4 -- To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html