sd-bus: initialize return values on success in sd_bus_message_read_array()
Fixes: #17346
This commit is contained in:
@@ -4795,8 +4795,13 @@ _public_ int sd_bus_message_read_array(
|
||||
assert_return(!BUS_MESSAGE_NEED_BSWAP(m), -EOPNOTSUPP);
|
||||
|
||||
r = sd_bus_message_enter_container(m, SD_BUS_TYPE_ARRAY, CHAR_TO_STR(type));
|
||||
if (r <= 0)
|
||||
if (r < 0)
|
||||
return r;
|
||||
if (r == 0) {
|
||||
*ptr = NULL;
|
||||
*size = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
c = message_get_last_container(m);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user