eldbus: Fix possible null dereference reported by Coverity

Summary: Fix Coverity CID1256952: reports a null derefence here due to
eldbus_message_new returning NULL, thus causing a null dereference
when trying to set reply->dbus_msg

@fix

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2014-12-10 13:24:54 -05:00
parent 6972d25dc9
commit 6e46642dfb
1 changed files with 2 additions and 0 deletions

View File

@ -835,6 +835,8 @@ eldbus_message_error_new(const Eldbus_Message *msg, const char *error_name, cons
EINA_SAFETY_ON_NULL_RETURN_VAL(error_msg, NULL);
reply = eldbus_message_new(EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(reply, NULL);
reply->dbus_msg = dbus_message_new_error(msg->dbus_msg,
error_name, error_msg);