From bde98850be7d7868c59597012e3366cf14fd0169 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 9 Jul 2005 01:53:57 +0000 Subject: r8247: remove the free of fullname in nbtname.c for now. Metze, the ndr_token_store() code is storing temporary pointers into this string in the token list, which means we are referring to freed memory when we scan the token list. A better key might be a pointer into the ndr buffer? (This used to be commit 6a4e8cc991613773a65545eb308cf4ead75844e8) --- source4/libcli/nbt/nbtname.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source4/libcli') diff --git a/source4/libcli/nbt/nbtname.c b/source4/libcli/nbt/nbtname.c index 205567a55b..b59c24e7cf 100644 --- a/source4/libcli/nbt/nbtname.c +++ b/source4/libcli/nbt/nbtname.c @@ -343,8 +343,12 @@ NTSTATUS ndr_push_nbt_name(struct ndr_push *ndr, int ndr_flags, const struct nbt } status = ndr_push_nbt_string(ndr, ndr_flags, fullname); +#if 0 + /* this free conflicts with the use of pointers into strings + in the ndr_token_store() calls above. Metze, can you look + at this? */ talloc_free(fullname); - +#endif return status; } -- cgit