summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2014-11-23 19:58:45 +0100
committerJakub Hrozek <jhrozek@redhat.com>2014-11-25 15:04:00 +0100
commit6c4b1250ece32296ccdc15eccf2a0f740b3768b0 (patch)
tree10a574b6876790851f0e8c64122173cd13371eca
parente894a127a9979dea667408b0cced59fedc3bcd0a (diff)
downloadsssd-6c4b1250ece32296ccdc15eccf2a0f740b3768b0.tar.gz
sssd-6c4b1250ece32296ccdc15eccf2a0f740b3768b0.tar.xz
sssd-6c4b1250ece32296ccdc15eccf2a0f740b3768b0.zip
SBUS: Initialize DBusError before using it
In case either handler_fn() or invoker_fn() failed in sbus_request_invoke_or_finish() we would have accessed an uninitialized DBusError variable, causing a segfault. Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
-rw-r--r--src/sbus/sssd_dbus_request.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/sbus/sssd_dbus_request.c b/src/sbus/sssd_dbus_request.c
index 677ed532f..2db9513f6 100644
--- a/src/sbus/sssd_dbus_request.c
+++ b/src/sbus/sssd_dbus_request.c
@@ -79,6 +79,7 @@ sbus_request_invoke_or_finish(struct sbus_request *dbus_req,
sbus_request_finish(dbus_req, NULL);
break;
default:
+ dbus_error_init(&error);
dbus_set_error_const(&error, DBUS_ERROR_FAILED, INTERNAL_ERROR);
sbus_request_fail_and_finish(dbus_req, &error);
break;