mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-08 10:40:23 +01:00
glamor: Fix memory leak in getspans.
This commit is contained in:
parent
cdb1fe6d96
commit
0360ba361a
1 changed files with 2 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue