Hi, On 3 January 2018 at 22:25, Derek Foreman <der...@osg.samsung.com> wrote: > On 2017-12-28 01:53 PM, Daniel Stone wrote: >> @@ -434,10 +499,14 @@ proxy_destroy(struct wl_proxy *proxy) >> if (proxy->flags & WL_PROXY_FLAG_ID_DELETED) { >> wl_map_remove(&proxy->display->objects, proxy->object.id); >> } else if (proxy->object.id < WL_SERVER_ID_START) { >> + struct wl_zombie *zombie = prepare_zombie(proxy); > > > I think we discussed this on irc and I said this patch was ok, but I missed > this change... > > prepare_zombie(proxy) should probably only be called from wl_proxy_create > and create_for_id - calling it in the destroy path results in a malloc() > call during deleting. > > Should the malloc() fail and we can't actually allocate the zombie at during > deletion we're going to have a problem.
Hm, yes. On the other hand, if we can't allocate the zombie object, then we probably won't be able to allocate the closure when demarshaling the events either? The other thing I started doing before this move, was just allocating zombie on the end of the wl_proxy so we only have one allocation and free. It does mean that proxies will consume more memory when undead, I suppose. I don't have strong feelings either way, so am happy to with any of those three ... > Otherwise, I like the way you've split up the series, and I've reviewed your > new patches. Thanks a lot! I'll leave them sit for a couple more days to see if anyone spots anything and then just push them if not. Cheers, Daniel _______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel