Assorted coverity fixes (#42933)

This commit is contained in:
Lennart Poettering
2026-07-09 11:01:03 +02:00
committed by GitHub
2 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -76,7 +76,7 @@ void bus_slot_disconnect(sd_bus_slot *slot, bool unref) {
}
slot->bus->match_callbacks_modified = true;
bus_match_remove(&slot->bus->match_callbacks, &slot->match_callback);
(void) bus_match_remove(&slot->bus->match_callbacks, &slot->match_callback);
slot->match_callback.match_string = mfree(slot->match_callback.match_string);
@@ -8,6 +8,7 @@
#include "device-monitor-private.h"
#include "device-private.h"
#include "device-util.h"
#include "fd-util.h"
#include "io-util.h"
#include "iovec-util.h"
#include "mountpoint-util.h"
@@ -444,7 +445,9 @@ TEST(sd_device_monitor_receive_bad_properties_off) {
.msg_name = &sa,
.msg_namelen = sizeof(struct sockaddr_nl),
};
ASSERT_OK_ERRNO(sendmsg(sd_device_monitor_get_fd(monitor_server), &smsg, 0));
int fd = ASSERT_FD(sd_device_monitor_get_fd(monitor_server));
ASSERT_OK_ERRNO(sendmsg(fd, &smsg, 0));
_cleanup_(sd_device_unrefp) sd_device *dev = NULL;
ASSERT_ERROR(sd_device_monitor_receive(monitor_client, &dev), EAGAIN);