radeon: fix bug in realloc code.
This bug was fixed in libdrm ages ago, port to non-kms
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user