Displaying 1 result from an estimated 1 matches for "talloc_chunk_size".
2000 Apr 29
0
fix to lib/talloc.c
...LOC_CTX *t, size_t size)
{
void *p;
- size = (size + TALLOC_ALIGN) & (~TALLOC_ALIGN-1);
+ size = (size + TALLOC_ALIGN) & (~(TALLOC_ALIGN-1));
if (!t->list || (t->list->total_size - t->list->alloc_size) < size) {
struct talloc_chunk *c;
- size_t asize = (size + TALLOC_CHUNK_SIZE) & ~(TALLOC_CHUNK_SIZE-1);
+ size_t asize = (sizeof(*c) + size + TALLOC_CHUNK_SIZE) & (~(TALLOC_CHUNK_SIZE-1));
- c = (struct talloc_chunk *)malloc(sizeof(*c));
- if (!c) return NULL;
- c->next = t->list;
- c->ptr = (void *)malloc(asize);
- if (!c->ptr) {
- free(c);
-...