glamor: Fix memory leak in getspans.
This commit is contained in:
parent
cdb1fe6d96
commit
0360ba361a
|
@ -58,7 +58,7 @@ glamor_get_spans(DrawablePtr drawable,
|
||||||
|
|
||||||
switch (drawable->depth) {
|
switch (drawable->depth) {
|
||||||
case 1:
|
case 1:
|
||||||
temp_dst = xalloc(4 * wmax);
|
temp_dst = xalloc(wmax);
|
||||||
format = GL_ALPHA;
|
format = GL_ALPHA;
|
||||||
type = GL_UNSIGNED_BYTE;
|
type = GL_UNSIGNED_BYTE;
|
||||||
readpixels_dst = temp_dst;
|
readpixels_dst = temp_dst;
|
||||||
|
@ -100,4 +100,5 @@ glamor_get_spans(DrawablePtr drawable,
|
||||||
readpixels_dst += PixmapBytePad(widths[i], drawable->depth);
|
readpixels_dst += PixmapBytePad(widths[i], drawable->depth);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
xfree(temp_dst);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user