Skip to content

Commit dd09b24

Browse files
committed
Initialize dbus_error.
1 parent 42a9bc3 commit dd09b24

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

daemon/dbus.c

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//
22
// D-Bus API support for cups-local.
33
//
4-
// Copyright © 2023 by OpenPrinting.
4+
// Copyright © 2023-2024 by OpenPrinting.
55
//
66
// Licensed under Apache License v2.0. See the file "LICENSE" for more
77
// information.
@@ -38,8 +38,13 @@ LocalDBusService(void *data) // I - Thread data (unused)
3838
(void)data;
3939

4040
// Connect to the session bus...
41+
dbus_error_init(&error);
42+
4143
if ((dbus = dbus_bus_get(DBUS_BUS_SESSION, &error)) == NULL)
44+
{
45+
dbus_error_free(&error);
4246
return (NULL);
47+
}
4348

4449
// Read message until error/exit...
4550
for (;;)

0 commit comments

Comments
 (0)