summaryrefslogtreecommitdiff
path: root/source3/smbd/notify.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd/notify.c')
-rw-r--r--source3/smbd/notify.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/source3/smbd/notify.c b/source3/smbd/notify.c
index ffdf1c22e7..eb3384d9a4 100644
--- a/source3/smbd/notify.c
+++ b/source3/smbd/notify.c
@@ -82,10 +82,9 @@ static bool notify_marshall_changes(int num_changes,
c = &changes[i];
- namelen = convert_string_allocate(
- NULL, CH_UNIX, CH_UTF16LE, c->name, strlen(c->name)+1,
- &uni_name.buffer, True);
- if ((namelen == -1) || (uni_name.buffer == NULL)) {
+ if (!convert_string_allocate(NULL, CH_UNIX, CH_UTF16LE,
+ c->name, strlen(c->name)+1, &uni_name.buffer,
+ &namelen, True) || (uni_name.buffer == NULL)) {
goto fail;
}