summaryrefslogtreecommitdiffstats
path: root/dbus/dbus-auth.c
diff options
context:
space:
mode:
Diffstat (limited to 'dbus/dbus-auth.c')
-rw-r--r--dbus/dbus-auth.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/dbus/dbus-auth.c b/dbus/dbus-auth.c
index 7fe9671a..9651df74 100644
--- a/dbus/dbus-auth.c
+++ b/dbus/dbus-auth.c
@@ -780,15 +780,15 @@ static dbus_bool_t
handle_client_initial_response_cookie_sha1_mech (DBusAuth *auth,
DBusString *response)
{
- const DBusString *username;
+ const DBusString username;
dbus_bool_t retval;
-
retval = FALSE;
+ _dbus_string_init(&username);
if (!_dbus_append_desired_identity (&username))
goto out_0;
- if (!_dbus_string_hex_encode (username, 0,
+ if (!_dbus_string_hex_encode (&username, 0,
response,
_dbus_string_get_length (response)))
goto out_0;
@@ -796,6 +796,7 @@ handle_client_initial_response_cookie_sha1_mech (DBusAuth *auth,
retval = TRUE;
out_0:
+ _dbus_string_free(&username);
return retval;
}