Blame SOURCES/0042-SBUS-Fix-error-handling-after-closing-container.patch
|
|
905b4d |
From 06db46d511ea4d5cce23354ed3c3a0069f06e27f Mon Sep 17 00:00:00 2001
|
|
|
905b4d |
From: Lukas Slebodnik <lslebodn@redhat.com>
|
|
|
905b4d |
Date: Fri, 10 Oct 2014 19:23:33 +0200
|
|
|
905b4d |
Subject: [PATCH 42/46] SBUS: Fix error handling after closing container
|
|
|
905b4d |
|
|
|
905b4d |
If function dbus_message_iter_close_container fail the return variable ret will
|
|
|
905b4d |
be set to EINVAL, but function will not be immediately terminated.
|
|
|
905b4d |
"goto done" was missing.
|
|
|
905b4d |
|
|
|
905b4d |
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
|
|
|
905b4d |
(cherry picked from commit 82b5395c1519b9392ddd323ece0845b51a994bbc)
|
|
|
905b4d |
---
|
|
|
905b4d |
src/sbus/sssd_dbus_request.c | 2 ++
|
|
|
905b4d |
1 file changed, 2 insertions(+)
|
|
|
905b4d |
|
|
|
905b4d |
diff --git a/src/sbus/sssd_dbus_request.c b/src/sbus/sssd_dbus_request.c
|
|
|
905b4d |
index 7729d4e0d7bf6e517e2efce4dbeb064f6f471b87..677ed532f7555f6aeba378ebd9a0b06167ddfa1b 100644
|
|
|
905b4d |
--- a/src/sbus/sssd_dbus_request.c
|
|
|
905b4d |
+++ b/src/sbus/sssd_dbus_request.c
|
|
|
905b4d |
@@ -286,6 +286,7 @@ int sbus_request_return_array_as_variant(struct sbus_request *dbus_req,
|
|
|
905b4d |
DBUS_ERROR_FAILED,
|
|
|
905b4d |
"Could not close array\n"));
|
|
|
905b4d |
ret = EINVAL;
|
|
|
905b4d |
+ goto done;
|
|
|
905b4d |
}
|
|
|
905b4d |
|
|
|
905b4d |
dbret = dbus_message_iter_close_container(&iter, &variant_iter);
|
|
|
905b4d |
@@ -298,6 +299,7 @@ int sbus_request_return_array_as_variant(struct sbus_request *dbus_req,
|
|
|
905b4d |
DBUS_ERROR_FAILED,
|
|
|
905b4d |
"Could not close variant\n"));
|
|
|
905b4d |
ret = EINVAL;
|
|
|
905b4d |
+ goto done;
|
|
|
905b4d |
}
|
|
|
905b4d |
|
|
|
905b4d |
done:
|
|
|
905b4d |
--
|
|
|
905b4d |
1.9.3
|
|
|
905b4d |
|