mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-30 05:43:28 +02:00
We were returning junk memory here, because we didn't copy the value
2001-04-19 Havoc Pennington <hp@redhat.com> * gobject.c (g_object_get_valist): We were returning junk memory here, because we didn't copy the value (G_VALUE_NOCOPY_CONTENTS passed to G_VALUE_LCOPY) and then we freed the GValue immediately after. Removed G_VALUE_NOCOPY_CONTENTS from here; need a G_VALUE_STEAL_CONTENTS or the like if we want this optimization.
This commit is contained in:
committed by
Havoc Pennington
parent
7ee286440d
commit
a786a9a020
@@ -983,7 +983,7 @@ g_object_get_valist (GObject *object,
|
||||
|
||||
object_get_property (object, pspec, &value);
|
||||
|
||||
G_VALUE_LCOPY (&value, var_args, G_VALUE_NOCOPY_CONTENTS, &error);
|
||||
G_VALUE_LCOPY (&value, var_args, 0, &error);
|
||||
if (error)
|
||||
{
|
||||
g_warning ("%s: %s", G_STRLOC, error);
|
||||
|
Reference in New Issue
Block a user