You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
1.4 KiB
32 lines
1.4 KiB
diff -up usbguard-1.0.0/src/DBus/DBusBridge.cpp.orig usbguard-1.0.0/src/DBus/DBusBridge.cpp
|
|
--- usbguard-1.0.0/src/DBus/DBusBridge.cpp.orig 2022-10-17 09:38:12.397308156 +0200
|
|
+++ usbguard-1.0.0/src/DBus/DBusBridge.cpp 2022-10-17 09:38:46.947342059 +0200
|
|
@@ -434,12 +434,11 @@ namespace usbguard
|
|
USBGUARD_LOG(Trace) << "Connecting with Polkit authority...";
|
|
PolkitAuthority* const authority = polkit_authority_get_sync(/*cancellable=*/ NULL, &error);
|
|
|
|
- if (! authority || error) {
|
|
+ if (! authority) {
|
|
USBGUARD_LOG(Trace) << "Failed to connect to Polkit authority: " << formatGError(error) << ".";
|
|
*authErrorCode = G_DBUS_ERROR_AUTH_FAILED;
|
|
*authErrorMessage = "Failed to connect to Polkit authority";
|
|
g_error_free(error);
|
|
- g_object_unref(authority);
|
|
g_object_unref(subject);
|
|
return false;
|
|
}
|
|
@@ -470,12 +469,11 @@ namespace usbguard
|
|
/*cancellable=*/ NULL,
|
|
&error);
|
|
|
|
- if (! result || error) {
|
|
+ if (! result) {
|
|
USBGUARD_LOG(Trace) << "Failed to check back with Polkit for authoriation: " << formatGError(error) << ".";
|
|
*authErrorCode = G_DBUS_ERROR_AUTH_FAILED;
|
|
*authErrorMessage = "Failed to check back with Polkit for authoriation.";
|
|
g_error_free(error);
|
|
- g_object_unref(result);
|
|
g_object_unref(details);
|
|
g_object_unref(authority);
|
|
g_object_unref(subject);
|