]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
bus-polkit: add one more assertion
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 17 Feb 2026 07:39:35 +0000 (16:39 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 17 Feb 2026 07:39:38 +0000 (16:39 +0900)
For CID#1645013.

src/shared/bus-polkit.c

index 3d32726f4e3ca884ba275c2be28ab4a6276551b8..c000b758695134261755635236f5ca69dae87323 100644 (file)
@@ -286,9 +286,7 @@ static int async_polkit_read_reply(sd_bus_message *reply, AsyncPolkitQuery *q) {
         a = ASSERT_PTR(TAKE_PTR(q->action));
 
         if (sd_bus_message_is_method_error(reply, NULL)) {
-                const sd_bus_error *e;
-
-                e = sd_bus_message_get_error(reply);
+                const sd_bus_error *e = ASSERT_PTR(sd_bus_message_get_error(reply));
 
                 if (bus_error_is_unknown_service(e)) {
                         /* If PK is absent, then store this away, as it depends on the callers flags whether