GNOME Bugzilla – Bug 674201
Implicit Variant conversions cause leaks
Last modified: 2012-06-02 15:07:38 UTC
As can be seen in a simple snippet: string get_owned_string () { return "foo"; } Variant v = get_owned_string (); The string returned by get_owned_string() is never freed, if one uses: string s = get_owned_string (); Variant v = s; The string is properly freed. (can be reproduced with 0.12, 0.14 and 0.16)
Same leak when using: process_unowned_string ((string) string_variant);
commit 1b9d1aa6f7abeacb13ac8fa97bb8e7ede453aec1 Author: Jürg Billeter <j@bitron.ch> Date: Sat Jun 2 17:03:40 2012 +0200 GVariant: Fix memory leak when boxing and unboxing variants Fixes bug 674201.