With the DLIST-based work queue we don't need to protect the "list
head" from reallocation anymore
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Jun 10 23:43:04 UTC 2020 on sn-devel-184
add_to_do_list_queue(mask);
while (!do_list_queue_empty()) {
- /*
- * Need to copy head so that it doesn't become
- * invalid inside the call to cli_list. This
- * would happen if the list were expanded
- * during the call.
- * Fix from E. Jay Berkenbilt (ejb@ql.org)
- */
- char *head = talloc_strdup(ctx, do_list_queue_head());
-
- if (!head) {
- return NT_STATUS_NO_MEMORY;
- }
+ const char *head = do_list_queue_head();
/* check for dfs */
*save_ch = CLI_DIRSEP_CHAR;
}
}
- TALLOC_FREE(head);
TALLOC_FREE(targetpath);
}