]> git.ipfire.org Git - thirdparty/dbus.git/commitdiff
Handle failure to allocate error message in _read_subprocess_line_argv
authorChristian Dywan <christian.dywan@lanedo.com>
Mon, 19 Jul 2010 09:36:15 +0000 (11:36 +0200)
committerSimon McVittie <smcv@debian.org>
Wed, 5 Jan 2011 14:47:12 +0000 (14:47 +0000)
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=29881

dbus/dbus-sysdeps-unix.c

index 7c5575710173971ff922afc1a007f4bf8944f52e..20700ae3fa8bd97129271ef642e21ac0057b8db5 100644 (file)
@@ -3188,7 +3188,12 @@ _read_subprocess_line_argv (const char *progpath,
     {
       /* The process ended with error */
       DBusString error_message;
-      _dbus_string_init (&error_message);
+      if (!_dbus_string_init (&error_message))
+        {
+          _DBUS_SET_OOM (error);
+          goto out;
+        }
+
       ret = 0;
       do
         {