summaryrefslogtreecommitdiff
path: root/source3/lib/talloc.c
AgeCommit message (Collapse)AuthorFilesLines
2000-08-12reworked talloc() to in order to help track down invalidGerald Carter1-25/+26
memory access. Tridge, I don't think using 0xdeadbeef for size allocations of 0 is going to work. I ended up having to use NULL as much code that works on UNISTR checks to see if the buffer ptr is NULL. So valid code ends up with a seg fault. Rather than rewriting it all, I added a DEBUG_TALLOC #ifdef in talloc.h that sets a macro BAD_PTR. This is the value assigned to ptr for an allocation of 0 bytes. jerry (This used to be commit 233b9cffa2350552d9f775f791d5d5e0464a1ed4)
2000-08-10talloc returns 0xdeadbeef when asked to allocate 0 bytesGerald Carter1-19/+29
jerry (This used to be commit df51dc32f6ffc4fe2cebfaae5079417aad1ff34d)
2000-07-27Ok - this is a *BIG* change - but it fixes the problems with static stringsJeremy Allison1-1/+8
in the RPC code. This change was prompted by trying to save a long (>256) character comment in the printer properties page. The new system associates a TALLOC_CTX with the pipe struct, and frees the pool on return of a complete PDU. A global TALLOC_CTX is used for the odd buffer allocated in the BUFFERxx code, and is freed in the main loop. This code works with insure, and seems to be free of memory leaks and crashes (so far) but there are probably the occasional problem with code that uses UNISTRxx structs on the stack and expects them to contain storage without doing a init_unistrXX(). This means that rpcclient will probably be horribly broken. A TALLOC_CTX also needed associating with the struct cli_state also, to make the prs_xx code there work. The main interface change is the addition of a TALLOC_CTX to the prs_init calls - used for dynamic allocation in the prs_XXX calls. Now this is in place it should make dynamic allocation of all RPC memory on unmarshall *much* easier to fix. Jeremy. (This used to be commit 0ff2ce543ee54f7364e6d839db6d06e7ef1edcf4)
2000-06-26fixed size alignment in tallocAndrew Tridgell1-2/+2
(This used to be commit 064cdb7ee69bff3af12d1e0b3c3b59207c594681)
2000-01-11Fixed pointer arithmetic found by IRIX compiler.Jeremy Allison1-1/+1
Jeremy. (This used to be commit 20d72e8959fc800836369e4c970f7cb84b95ac9a)
2000-01-05implemented talloc() as described on samba-technical. This fixes theAndrew Tridgell1-0/+96
lp_string() bug properly. we still need to add lp_talloc_free() calls in all the main event loops, I've only put it in smbd and nmbd thus far. (This used to be commit aa7f81552540f5dca2c146f5edd805611d5b390f)