eldbus: null checking before using the pointer
authorWooHyun Jung <wh0705.jung@samsung.com>
Tue, 20 Sep 2016 02:18:52 +0000 (11:18 +0900)
committerWooHyun Jung <wh0705.jung@samsung.com>
Tue, 20 Sep 2016 02:18:52 +0000 (11:18 +0900)
src/lib/eldbus/eldbus_message.c

index f18196c..2464d0e 100644 (file)
@@ -886,6 +886,8 @@ eldbus_message_method_return_new(const Eldbus_Message *msg)
    ELDBUS_MESSAGE_CHECK_RETVAL(msg, NULL);
 
    reply = eldbus_message_new(EINA_TRUE);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(reply, NULL);
+
    reply->dbus_msg = dbus_message_new_method_return(msg->dbus_msg);
 
    dbus_message_iter_init_append(reply->dbus_msg,