From 1b2c68de083f39b0078f5529e4f92530e1eed9b0 Mon Sep 17 00:00:00 2001 From: Ismo Puustinen Date: Wed, 28 May 2014 14:33:32 +0300 Subject: [PATCH] murphy-if: do not crash if message creation fails. Change-Id: Ia22714367150775a186aa5b54a7243b0e68a31f3 --- murphy/murphyif.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/murphy/murphyif.c b/murphy/murphyif.c index 0f2d8bc..ce24ba8 100644 --- a/murphy/murphyif.c +++ b/murphy/murphyif.c @@ -1086,7 +1086,8 @@ static bool resource_set_create_node(struct userdata *u, priority = (resdef ? resdef->priority : 0); - msg = resource_create_request(seqno, reqid); + if (!(msg = resource_create_request(seqno, reqid))) + return false; if (PUSH_VALUE(msg, RESOURCE_FLAGS , UINT32, rset_flags) && PUSH_VALUE(msg, RESOURCE_PRIORITY, UINT32, priority) && -- 2.7.4