radeon: fix bug in realloc code.

This bug was fixed in libdrm ages ago, port to non-kms
This commit is contained in:
Dave Airlie
2010-01-11 13:21:02 +10:00
committed by Dave Airlie
parent 32da02f7c1
commit 554043bff7
@@ -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;