mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-05-08 20:48:02 +02:00
test: Add some OOM paths to the test-privserver test
This is mostly pointless, but should shut Coverity up. Coverity ID: 54693 Signed-off-by: Philip Withnall <withnall@endlessm.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=99722 Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
This commit is contained in:
parent
33098394ba
commit
84cd6243b3
1 changed files with 12 additions and 3 deletions
|
|
@ -45,11 +45,20 @@ filter_session_message (DBusConnection *connection,
|
|||
"GetPrivateAddress"))
|
||||
{
|
||||
DBusMessage *reply;
|
||||
|
||||
reply = dbus_message_new_method_return (message);
|
||||
dbus_message_append_args (reply, DBUS_TYPE_STRING,
|
||||
&(testdata->private_addr), DBUS_TYPE_INVALID);
|
||||
dbus_connection_send (connection, reply, NULL);
|
||||
if (reply == NULL)
|
||||
die ("OOM");
|
||||
if (!dbus_message_append_args (reply, DBUS_TYPE_STRING,
|
||||
&(testdata->private_addr),
|
||||
DBUS_TYPE_INVALID))
|
||||
die ("OOM");
|
||||
|
||||
if (!dbus_connection_send (connection, reply, NULL))
|
||||
die ("Error sending message");
|
||||
|
||||
dbus_message_unref (reply);
|
||||
|
||||
return DBUS_HANDLER_RESULT_HANDLED;
|
||||
}
|
||||
else if (dbus_message_is_method_call (message,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue