From 14be9f738b84a9b835a5804c5d28ae43e90ab76f Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Mon, 19 Jul 2010 11:36:15 +0200 Subject: [PATCH] Handle failure to allocate error message in _read_subprocess_line_argv Reviewed-by: Simon McVittie Bug: https://bugs.freedesktop.org/show_bug.cgi?id=29881 --- dbus/dbus-sysdeps-unix.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dbus/dbus-sysdeps-unix.c b/dbus/dbus-sysdeps-unix.c index 7c5575710..20700ae3f 100644 --- a/dbus/dbus-sysdeps-unix.c +++ b/dbus/dbus-sysdeps-unix.c @@ -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 { -- 2.47.3