glamor: Fix memory leak in getspans.

This commit is contained in:
Eric Anholt 2009-08-24 08:06:57 -07:00 committed by Zhigang Gong
parent cdb1fe6d96
commit 0360ba361a

View File

@ -58,7 +58,7 @@ glamor_get_spans(DrawablePtr drawable,
switch (drawable->depth) {
case 1:
temp_dst = xalloc(4 * wmax);
temp_dst = xalloc(wmax);
format = GL_ALPHA;
type = GL_UNSIGNED_BYTE;
readpixels_dst = temp_dst;
@ -100,4 +100,5 @@ glamor_get_spans(DrawablePtr drawable,
readpixels_dst += PixmapBytePad(widths[i], drawable->depth);
}
}
xfree(temp_dst);
}