From bf99381351b802fb3348a24037898222aae631e2 Mon Sep 17 00:00:00 2001 From: Havoc Pennington Date: Fri, 28 Mar 2003 05:42:19 +0000 Subject: 2003-03-28 Havoc Pennington * bus/test.c (bus_test_flush_bus): remove the sleep from here, I think it may have just been superstition. Not sure. * dbus/dbus-string.c (_dbus_string_base64_decode): catch some OOM failures that were not being handled. * dbus/dbus-auth.c (process_auth): fix a memleak in OOM handling * dbus/dbus-memory.c: add ability to set number of mallocs in a row that will fail on out-of-memory. * dbus/dbus-internals.c (_dbus_test_oom_handling): convenience function for testing out-of-memory handling. * bus/config-loader-expat.c (memsuite): don't wrap the dbus allocation functions, they do map exactly to the expat ones. --- dbus/dbus-auth.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'dbus/dbus-auth.c') diff --git a/dbus/dbus-auth.c b/dbus/dbus-auth.c index 8f8aec44..1aa83e7c 100644 --- a/dbus/dbus-auth.c +++ b/dbus/dbus-auth.c @@ -1241,14 +1241,14 @@ process_auth (DBusAuth *auth, _dbus_string_free (&mech); return FALSE; } - + if (!_dbus_string_init (&decoded_response, _DBUS_INT_MAX)) { _dbus_string_free (&mech); _dbus_string_free (&base64_response); return FALSE; } - + if (!_dbus_string_copy_len (args, 0, i, &mech, 0)) goto failed; @@ -1258,7 +1258,7 @@ process_auth (DBusAuth *auth, if (!_dbus_string_base64_decode (&base64_response, 0, &decoded_response, 0)) goto failed; - + auth->mech = find_mech (&mech); if (auth->mech != NULL) { @@ -1274,7 +1274,7 @@ process_auth (DBusAuth *auth, { /* Unsupported mechanism */ if (!send_rejected (auth)) - return FALSE; + goto failed; } _dbus_string_free (&mech); -- cgit