[Spice-devel] [Spice-commits] 2 commits - server/reds.c server/red_worker.c

Izik Eidus ieidus at redhat.com
Wed Apr 7 07:16:05 PDT 2010


On Wed, 07 Apr 2010 16:52:38 +0300
Yonit Halperin <yhalperi at redhat.com> wrote:

> 
> >
> > +static void red_clear_surface_glz_drawables(RedWorker *worker, int surface_id)
> > +{
> > +    RingItem *ring_item;
> > +
> > +    if (!worker->display_channel) {
> > +        return;
> > +    }
> > +
> > +    pthread_mutex_lock(&worker->display_channel->glz_drawables_inst_to_free_lock);
> > +
> > +    while ((ring_item = ring_get_head(&worker->surfaces[surface_id].glz_drawables))) {
> > +        RedGlzDrawable *now = SPICE_CONTAINEROF(ring_item, RedGlzDrawable, surface_link);
> > +        red_display_free_glz_drawable(worker->display_channel, now);
> > +    }
> > +
> > +    pthread_mutex_unlock(&worker->display_channel->glz_drawables_inst_to_free_lock);
> > +}
> > +
> 
> Wrong lock, you should use glz_dict->encode_lock.

Yes you are right, good catch.

> 
> Yonit.



More information about the Spice-devel mailing list