GNOME Bugzilla – Bug 662411
GDBusMessage: fix leak of GError
Last modified: 2011-10-21 19:20:01 UTC
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.
Created attachment 199680 [details] [review] GDBusMessage: fix leak of GError
Review of attachment 199680 [details] [review]: Sure, looks right.
Yeah, go for it (2.28 and 2.30 branches too, please). Thanks
I pushed to master and glib-2-30, but it didn't apply to glib-2-28 and I'm lazy. :) Attachment 199680 [details] pushed as 9c07e7d - GDBusMessage: fix leak of GError