mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-17 21:08:49 +02:00
ri Oct 27 05:35:14 2000 Tim Janik <timj@gtk.org>
* gobject.c (g_object_watch_closure): fixed realloc bug, reported by havoc.
This commit is contained in:
parent
8a572c0da1
commit
1e23d8a9bc
@ -1,5 +1,8 @@
|
|||||||
Fri Oct 27 05:35:14 2000 Tim Janik <timj@gtk.org>
|
Fri Oct 27 05:35:14 2000 Tim Janik <timj@gtk.org>
|
||||||
|
|
||||||
|
* gobject.c (g_object_watch_closure): fixed realloc bug, reported
|
||||||
|
by havoc.
|
||||||
|
|
||||||
* gsignal.c (g_signal_newv): fixed deadlock scenarion where
|
* gsignal.c (g_signal_newv): fixed deadlock scenarion where
|
||||||
g_signal_lookup() would be called with the signal lock being
|
g_signal_lookup() would be called with the signal lock being
|
||||||
held. reported by james henstridge.
|
held. reported by james henstridge.
|
||||||
|
@ -960,7 +960,7 @@ g_object_watch_closure (GObject *object,
|
|||||||
g_closure_add_marshal_guards (closure,
|
g_closure_add_marshal_guards (closure,
|
||||||
object, (GClosureNotify) g_object_ref,
|
object, (GClosureNotify) g_object_ref,
|
||||||
object, (GClosureNotify) g_object_unref);
|
object, (GClosureNotify) g_object_unref);
|
||||||
carray = g_object_get_qdata (object, quark_closure_array);
|
carray = g_object_steal_qdata (object, quark_closure_array);
|
||||||
if (!carray)
|
if (!carray)
|
||||||
{
|
{
|
||||||
carray = g_renew (CArray, NULL, 1);
|
carray = g_renew (CArray, NULL, 1);
|
||||||
@ -975,6 +975,7 @@ g_object_watch_closure (GObject *object,
|
|||||||
|
|
||||||
carray = g_realloc (carray, sizeof (*carray) + sizeof (carray->closures[0]) * i);
|
carray = g_realloc (carray, sizeof (*carray) + sizeof (carray->closures[0]) * i);
|
||||||
carray->closures[i] = closure;
|
carray->closures[i] = closure;
|
||||||
|
g_object_set_qdata_full (object, quark_closure_array, carray, destroy_closure_array);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user