summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Lortie <desrt@desrt.ca>2011-10-21 14:05:10 -0400
committerRyan Lortie <desrt@desrt.ca>2011-10-21 15:18:20 -0400
commit9c07e7dc90b1331dab9f0e960d119d0889c7d585 (patch)
tree65e3df599ad85fed2eeba2ff30571bed3cef8821
parent3d13ee1b5ff2a2ad5f32704cc5f071167a8852a6 (diff)
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
-rw-r--r--gio/gdbusmessage.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gio/gdbusmessage.c b/gio/gdbusmessage.c
index 541045821..82860f45a 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