talloc()
Gerald Carter
gcarter at valinux.com
Thu Aug 10 06:41:03 GMT 2000
Here's a little be on interesting information...
two consecutive calls to talloc() of 0 size will return
pointers to the same memory location. This has come up in
prs_unistr(). If the amout of allocated space needed is 0,
the the str->buffer will still get assigned a memory address
by prs_alloc_mem().
**and the next prs_unistr will get the same memory!
Hmmm....My gut says that the first UNISTR should have its buffer
set to NULL instead. Any reason why not? I'll play with it
and see.
Cheers, jerry
----------------------------------------------------------------------
/\ Gerald (Jerry) Carter Professional Services
\/ http://www.valinux.com VA Linux Systems gcarter at valinux.com
http://www.samba.org SAMBA Team jerry at samba.org
http://www.eng.auburn.edu/~cartegw
"...a hundred billion castaways looking for a home."
- Sting "Message in a Bottle" ( 1979 )
More information about the samba-technical
mailing list