mirror of
https://github.com/schoebel/mars
synced 2025-02-17 12:37:20 +00:00
copy: safeguard allocation problems
This commit is contained in:
parent
49c408cac2
commit
7caf2341ea
@ -1373,6 +1373,9 @@ static int copy_brick_construct(struct copy_brick *brick)
|
|||||||
void **st;
|
void **st;
|
||||||
unsigned i;
|
unsigned i;
|
||||||
|
|
||||||
|
if (unlikely(brick->st)) {
|
||||||
|
MARS_ERR("Re-initialize state table\n");
|
||||||
|
}
|
||||||
st = brick_block_alloc(0, PAGE_SIZE);
|
st = brick_block_alloc(0, PAGE_SIZE);
|
||||||
memset(st, 0, PAGE_SIZE);
|
memset(st, 0, PAGE_SIZE);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user