libsmb: Remove a talloc_strdup()
authorVolker Lendecke <vl@samba.org>
Mon, 20 May 2024 13:19:06 +0000 (15:19 +0200)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 22 May 2024 04:23:29 +0000 (04:23 +0000)
We're directly overwriting state->mask without actually using it for
anything real.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source3/libsmb/clilist.c

index 2dbde30020153009d58482f34eb118c98c92b995..d8951482bacaf1e4675fc13b06c17dced9654a57 100644 (file)
@@ -667,11 +667,7 @@ static struct tevent_req *cli_list_trans_send(TALLOC_CTX *mem_ctx,
        }
        state->ev = ev;
        state->cli = cli;
-       state->mask = talloc_strdup(state, mask);
-       if (tevent_req_nomem(state->mask, req)) {
-               return tevent_req_post(req, ev);
-       }
-       state->mask = smb1_dfs_share_path(state, cli, state->mask);
+       state->mask = smb1_dfs_share_path(state, cli, mask);
        if (tevent_req_nomem(state->mask, req)) {
                return tevent_req_post(req, ev);
        }