summaryrefslogtreecommitdiffstats
path: root/bus/bus.c
diff options
context:
space:
mode:
Diffstat (limited to 'bus/bus.c')
-rw-r--r--bus/bus.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/bus/bus.c b/bus/bus.c
index a00201af..91c9e6a7 100644
--- a/bus/bus.c
+++ b/bus/bus.c
@@ -37,6 +37,7 @@ struct BusContext
{
int refcount;
char *type;
+ char *bus_env_var;
char *address;
char *pidfile;
DBusLoop *loop;
@@ -398,6 +399,11 @@ bus_context_new (const DBusString *config_file,
/* note that type may be NULL */
context->type = _dbus_strdup (bus_config_parser_get_type (parser));
+ if (bus_config_parser_get_type (parser) != NULL && context->type == NULL)
+ {
+ BUS_SET_OOM (error);
+ goto failed;
+ }
/* We have to build the address backward, so that
* <listen> later in the config file have priority