[at-spi2-atk] Don't leave va_args dangling
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [at-spi2-atk] Don't leave va_args dangling
- Date: Thu, 20 Oct 2011 10:25:24 +0000 (UTC)
commit e648f8220905b17632f7d4b2f16deac1b0aff7d0
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Oct 19 18:42:18 2011 -0400
Don't leave va_args dangling
spi_dbus_message_iter_append_struct has an early exit where it
forgets to call va_end(). Harmless most of the time, but it
upsets static analyzers.
https://bugzilla.gnome.org/show_bug.cgi?id=662248
atk-adaptor/spi-dbus.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/atk-adaptor/spi-dbus.c b/atk-adaptor/spi-dbus.c
index b448510..e4fa49a 100644
--- a/atk-adaptor/spi-dbus.c
+++ b/atk-adaptor/spi-dbus.c
@@ -125,8 +125,8 @@ dbus_bool_t spi_dbus_message_iter_append_struct(DBusMessageIter *iter, ...)
ptr = va_arg(args, void *);
dbus_message_iter_append_basic(&iter_struct, type, ptr);
}
- if (!dbus_message_iter_close_container(iter, &iter_struct)) return FALSE;
va_end(args);
+ if (!dbus_message_iter_close_container(iter, &iter_struct)) return FALSE;
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]