]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
test_try_connect_to_bus: Cope with OOM while setting up connection
authorSimon McVittie <smcv@collabora.com>
Mon, 27 Nov 2017 19:21:09 +0000 (19:21 +0000)
committerSimon McVittie <smcv@collabora.com>
Mon, 4 Dec 2017 11:52:43 +0000 (11:52 +0000)
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>
test/test-utils-glib.c

index fd804c9679eb62a07d3c31b310c36034567220f1..5394ca4e9bc6aec6f71b2f5e257dc83208be7131 100644 (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: