From ea6094d2cbb6d96baa5db0a1cb3fdbc7f58d73e2 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Thu, 9 Apr 2009 11:36:45 +0200 Subject: Use talloc_tos() for a temp convert_string_allocate() --- source3/smbd/notify.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source3/smbd/notify.c') diff --git a/source3/smbd/notify.c b/source3/smbd/notify.c index fdab2ca848..dc1599b462 100644 --- a/source3/smbd/notify.c +++ b/source3/smbd/notify.c @@ -81,7 +81,7 @@ static bool notify_marshall_changes(int num_changes, c = &changes[i]; - if (!convert_string_allocate(NULL, CH_UNIX, CH_UTF16LE, + if (!convert_string_allocate(talloc_tos(), CH_UNIX, CH_UTF16LE, c->name, strlen(c->name)+1, &uni_name.buffer, &namelen, True) || (uni_name.buffer == NULL)) { goto fail; @@ -109,7 +109,7 @@ static bool notify_marshall_changes(int num_changes, */ prs_set_offset(ps, prs_offset(ps)-2); - SAFE_FREE(uni_name.buffer); + TALLOC_FREE(uni_name.buffer); if (prs_offset(ps) > max_offset) { /* Too much data for client. */ @@ -123,7 +123,7 @@ static bool notify_marshall_changes(int num_changes, return True; fail: - SAFE_FREE(uni_name.buffer); + TALLOC_FREE(uni_name.buffer); return False; } -- cgit