From: Christian Dywan Date: Mon, 19 Jul 2010 09:36:15 +0000 (+0200) Subject: Handle failure to allocate error message in _read_subprocess_line_argv X-Git-Tag: dbus-1.4.4~45 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=14be9f738b84a9b835a5804c5d28ae43e90ab76f;p=thirdparty%2Fdbus.git 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 --- 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 {