mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-26 23:00:34 +01:00
radeon: fix bug in realloc code.
This bug was fixed in libdrm ages ago, port to non-kms
This commit is contained in:
parent
32da02f7c1
commit
554043bff7
1 changed files with 1 additions and 1 deletions
|
|
@ -182,7 +182,7 @@ static int cs_begin(struct radeon_cs_int *cs,
|
|||
uint32_t tmp, *ptr;
|
||||
int num = (ndw > 0x3FF) ? ndw : 0x3FF;
|
||||
|
||||
tmp = (cs->cdw + 1 + num) & (~num);
|
||||
tmp = (cs->cdw + ndw + 0x3ff) & (~0x3ff);
|
||||
ptr = (uint32_t*)realloc(cs->packets, 4 * tmp);
|
||||
if (ptr == NULL) {
|
||||
return -ENOMEM;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue