Commit df3b2684 authored by Jesse Barnes's avatar Jesse Barnes

DRI2: release our private front buffer ref when buffer swapping

Pauli pointed out that we take a ref on the front buffer when exchanging
but forget to release it.  The ref is necessary since the set functions
will drop refs as necessary, but once we set the front buffer to point
at the back pixmap, we ned to release our private ref again, or we'll
leak buffers.
Reported-by: Pauli Nieminen's avatarPauli Nieminen <>
Signed-off-by: Jesse Barnes's avatarJesse Barnes <>
parent 362a49e7
......@@ -446,12 +446,17 @@ I830DRI2ExchangeBuffers(DrawablePtr draw, DRI2BufferPtr front,
back->name = tmp;
/* Swap pixmap bos */
/* Hold a ref on the front so the set calls below don't destroy it */
tmp_bo = i830_get_pixmap_bo(front_priv->pixmap);
i830_set_pixmap_bo(back_priv->pixmap, tmp_bo); /* should be screen */
/* Release our ref, the last set should have bumped it */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment