0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 10:12:39 +01:00

balloc: Fix memory leak when get_block() fails.

This commit is contained in:
Jilles Tjoelker 2014-02-23 22:14:47 +01:00
parent e3a3eb92a4
commit 899b05d387

View file

@ -240,6 +240,7 @@ newblock(rb_bh *bh)
b->elems = get_block(b->alloc_size);
if(rb_unlikely(b->elems == NULL))
{
rb_free(b);
return (1);
}
offset = (uintptr_t)b->elems;