>From 87ea759cbafc2b44d4cf88ea5b50d098d09cef6c Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Mon, 19 Jul 2010 11:36:15 +0200 Subject: Handle failure to allocate error message in _read_subprocess_line_argv --- dbus/dbus-sysdeps-unix.c | 8 +++++++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/dbus/dbus-sysdeps-unix.c b/dbus/dbus-sysdeps-unix.c index ebe9bdd..0a656da 100644 --- a/dbus/dbus-sysdeps-unix.c +++ b/dbus/dbus-sysdeps-unix.c @@ -3063,7 +3063,13 @@ _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_error (error, DBUS_ERROR_SPAWN_EXEC_FAILED, + "%s terminated abnormally"); + goto out; + } + ret = 0; do { -- 1.7.1.1