summaryrefslogtreecommitdiff
path: root/source3/utils
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-02-22 11:53:50 +0100
committerVolker Lendecke <vl@samba.org>2009-02-24 20:40:46 +0100
commitdbc79381a87269e8ca0631e001aebb064ab4851b (patch)
treefb116bb664c8fd437aa4bc7e7d191a364e430307 /source3/utils
parent365925eea308673f15e03d81b69f04b8908468e7 (diff)
downloadsamba-dbc79381a87269e8ca0631e001aebb064ab4851b.tar.gz
samba-dbc79381a87269e8ca0631e001aebb064ab4851b.tar.bz2
samba-dbc79381a87269e8ca0631e001aebb064ab4851b.zip
Convert name_mangle() to use talloc
Diffstat (limited to 'source3/utils')
-rw-r--r--source3/utils/smbfilter.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/source3/utils/smbfilter.c b/source3/utils/smbfilter.c
index 1fdea818d6..39a264011e 100644
--- a/source3/utils/smbfilter.c
+++ b/source3/utils/smbfilter.c
@@ -91,8 +91,15 @@ static void filter_request(char *buf)
d_printf("sesion_request: %s -> %s\n",
name1, name2);
if (netbiosname) {
- /* replace the destination netbios name */
- name_mangle(netbiosname, buf+4, 0x20);
+ char *mangled = name_mangle(
+ talloc_tos(), netbiosname, 0x20);
+ if (mangled != NULL) {
+ /* replace the destination netbios
+ * name */
+ memcpy(buf+4, mangled,
+ name_len(mangled));
+ TALLOC_FREE(mangled);
+ }
}
}
return;