test_try_connect_to_bus: Cope with OOM while setting up connection

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=100317
Reviewed-by: Philip Withnall <withnall@endlessm.com>
Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
Simon McVittie 2017-11-27 19:21:09 +00:00
parent d5d7d09979
commit 929c15c797

View file

@ -346,7 +346,12 @@ test_try_connect_to_bus (TestMainContext *ctx,
g_assert (dbus_bus_get_unique_name (conn) != NULL);
test_connection_setup (ctx, conn);
if (!test_connection_setup (ctx, conn))
{
_DBUS_SET_OOM (&error);
goto fail;
}
return conn;
fail: