mirror of https://github.com/schoebel/mars
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;
|
||||
unsigned i;
|
||||
|
||||
if (unlikely(brick->st)) {
|
||||
MARS_ERR("Re-initialize state table\n");
|
||||
}
|
||||
st = brick_block_alloc(0, PAGE_SIZE);
|
||||
memset(st, 0, PAGE_SIZE);
|
||||
|
||||
|
|
Loading…
Reference in New Issue