[SSSD] [PATCH] SBUS: Fir error handling after closing container

Lukas Slebodnik lslebodn at redhat.com
Sat Oct 11 21:43:28 UTC 2014


ehlo,

If function dbus_message_iter_close_container fail the return variable ret will
be set to EINVAL, but function will not be immediately terminated.
"goto done" was missing.

simple patch is attached.

LS
-------------- next part --------------
>From d4a5fd35c95defc6e16852a5747ad30a0438f786 Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lslebodn at redhat.com>
Date: Fri, 10 Oct 2014 19:23:33 +0200
Subject: [PATCH 2/9] SBUS: Fir error handling after closing container

If function dbus_message_iter_close_container fail the return variable ret will
be set to EINVAL, but function will not be immediately terminated.
"goto done" was missing.
---
 src/sbus/sssd_dbus_request.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/sbus/sssd_dbus_request.c b/src/sbus/sssd_dbus_request.c
index 7729d4e0d7bf6e517e2efce4dbeb064f6f471b87..b618fe602ef77d117c534f3d45fb9b47911c4306 100644
--- a/src/sbus/sssd_dbus_request.c
+++ b/src/sbus/sssd_dbus_request.c
@@ -286,6 +286,7 @@ int sbus_request_return_array_as_variant(struct sbus_request *dbus_req,
                                         DBUS_ERROR_FAILED,
                                         "Could not close array\n"));
         ret = EINVAL;
+        goto done;
     }
 
     dbret = dbus_message_iter_close_container(&iter, &variant_iter);
-- 
2.1.0



More information about the sssd-devel mailing list