[glib/glib-2-30] GDBusMessage: fix leak of GError
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib/glib-2-30] GDBusMessage: fix leak of GError
- Date: Fri, 21 Oct 2011 19:19:31 +0000 (UTC)
commit ad6cb36ee2c9b2d53ce5479aadc9e5ced4566a46
Author: Ryan Lortie <desrt desrt ca>
Date: Fri Oct 21 14:05:10 2011 -0400
GDBusMessage: fix leak of GError
As part of the deserialisation process of a zero-length array in the
DBus wire format, parse_value_from_blob() recursively calls itself with
the expectation of failing (as can be seen by the assert immediately
following).
It passes &local_error to this always-failing call and then fails to
free it (indeed, to use it at all). The result is that the GError is
leaked.
Fix it by passing in NULL instead, so that the GError is never created
in the first place.
https://bugzilla.gnome.org/show_bug.cgi?id=662411
gio/gdbusmessage.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gio/gdbusmessage.c b/gio/gdbusmessage.c
index 5410458..82860f4 100644
--- a/gio/gdbusmessage.c
+++ b/gio/gdbusmessage.c
@@ -1340,7 +1340,7 @@ parse_value_from_blob (GMemoryInputStream *mis,
element_type,
TRUE,
indent + 2,
- &local_error);
+ NULL);
g_assert (item == NULL);
}
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]