From b8225c905bfff5543d91f57b46aaf5cf17ea60e2 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Tue, 9 Apr 2024 16:11:09 +0100 Subject: [PATCH] gdbusconnection: Ensure out_serial return value is always set MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Helps: #1767 --- gio/gdbusconnection.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gio/gdbusconnection.c b/gio/gdbusconnection.c index 42134a601..1e13606d1 100644 --- a/gio/gdbusconnection.c +++ b/gio/gdbusconnection.c @@ -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;