[Spice-devel] [PATCH 3/3] server/red_worker: fix possible leak of self_bitmap
uril at redhat.com
Tue May 15 02:18:44 PDT 2012
On 05/15/2012 11:57 AM, Yonit Halperin wrote:
> Instead of this patch series and the previous "self_bitmap" patch, I
> think we should do the following:
> Both GLZDrawable and Drawable share references to RedDrawable and
> self_bitmap, and self_bitmap life time is equal to RedDrawable's one.
> So we need to have a new type which warps RedDrawable and self_bitmap,
> and move the ref count from RedDrawable to this new type.
> Then, Drawable and GlzDrawable will just hold a reference to
> RedDrawableWrapper, instead of two references to RedDrawable and
> self_bitmap, and they will just decrease the reference to
> RedDrawableWrapper when they are released.
Can we just add self_bitmap into RedDrawable ?
More information about the Spice-devel