GNOME Bugzilla – Bug 654069
memory leak in giconstantinfo.c
Last modified: 2015-02-07 16:49:54 UTC
in g_constant_info_get_value, we do this: if (blob->type.flags.pointer) value->v_pointer = g_memdup (&rinfo->typelib->data[blob->offset], blob->size); but we never free the dup'd memory! should we have a g_constant_info_cleanup that decides if has a pointer and then clean up the dup'd memory, and use that?
Created attachment 198375 [details] [review] giconstantinfo: Add API to fix memory leak
Created attachment 198376 [details] [review] repo: Fix memory leak gjs patch to do the same
Review of attachment 198375 [details] [review]: Looks right.
Review of attachment 198376 [details] [review]: I'd say "Fix a memory leak looking up constants"
Review of attachment 198375 [details] [review]: Oh actually ::: girepository/giconstantinfo.c @@ +74,3 @@ + * @value: the argument + * + * Free the value returned from g_constant_info_get_value(). Actually could you add a: Since: 1.30.1
Comment on attachment 198375 [details] [review] giconstantinfo: Add API to fix memory leak Attachment 198375 [details] pushed as 8e970f4 - giconstantinfo: Add API to fix memory leak
Attachment 198376 [details] pushed as 8ba8bb3 - repo: Fix memory leak Pushed with suggested annotation change. Thanks!
[Mass-moving gobject-introspection tickets to its own Bugzilla product - see bug 708029. Mass-filter your bugmail for this message: introspection20150207 ]