gdbusconnection: Ensure out_serial return value is always set

There were some error paths where it wasn’t set, returning an
uninitialised value to the caller.

Spotted by scan-build.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>

Helps: #1767
This commit is contained in:
Philip Withnall 2024-04-09 16:11:09 +01:00
parent abdff22528
commit e2c3581e37
No known key found for this signature in database
GPG Key ID: DCDF5885B1F3ED73

View File

@ -1897,6 +1897,7 @@ g_dbus_connection_send_message_with_reply_unlocked (GDBusConnection *connect
if (out_serial == NULL)
out_serial = &serial;
*out_serial = 0;
if (timeout_msec == -1)
timeout_msec = 25 * 1000;