summaryrefslogtreecommitdiff
path: root/dbus
diff options
context:
space:
mode:
authorChristian Dywan <christian.dywan@lanedo.com>2010-07-19 11:36:15 +0200
committerSimon McVittie <smcv@debian.org>2011-01-05 14:47:12 +0000
commit14be9f738b84a9b835a5804c5d28ae43e90ab76f (patch)
tree8bd2f2477416df15315638886caf11e35b1566a3 /dbus
parent79b4e478d7fc3890355f17d63de494b4059f30d9 (diff)
Handle failure to allocate error message in _read_subprocess_line_argv
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=29881
Diffstat (limited to 'dbus')
-rw-r--r--dbus/dbus-sysdeps-unix.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/dbus/dbus-sysdeps-unix.c b/dbus/dbus-sysdeps-unix.c
index 7c557571..20700ae3 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
{