cli_list_trans_recv() can be called multiple times. When it's done, it
return NT_STATUS_OK and set *finfo to NULL. cli_list_old_recv() did
not do the NULL part, so smbclient would endlessly loop.
Bug: https://bugzilla.samba.org/show_bug.cgi?id=15382
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): Thu Jun 1 21:54:42 UTC 2023 on atb-devel-224
(cherry picked from commit
f30f5793ad592e193546586b765837c0ac9f5647)
Autobuild-User(v4-17-test): Jule Anger <janger@samba.org>
Autobuild-Date(v4-17-test): Fri Jun 2 13:52:29 UTC 2023 on sn-devel-184
+++ /dev/null
-^samba3.blackbox.smbclient_old_dir.*
return status;
}
+ if (state->dirlist == NULL) {
+ *pfinfo = NULL;
+ return NT_STATUS_OK;
+ }
+
num_received = talloc_array_length(state->dirlist) / DIR_STRUCT_SIZE;
finfo = talloc_array(mem_ctx, struct file_info, num_received);
return status;
}
}
+ TALLOC_FREE(state->dirlist);
*pfinfo = finfo;
return NT_STATUS_OK;
}