From 38280155fd6fc899825cd69a5b6bf830553e4c09 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Mon, 27 Nov 2017 19:21:09 +0000 Subject: [PATCH 4/9] test_try_connect_to_bus: Cope with OOM while setting up connection Signed-off-by: Simon McVittie --- test/test-utils-glib.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/test-utils-glib.c b/test/test-utils-glib.c index fd804c96..5394ca4e 100644 --- a/test/test-utils-glib.c +++ b/test/test-utils-glib.c @@ -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: -- 2.15.0