mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
libcli/smb: clang: Fix 'array access results in a null pointer deref'
Fixes: smbXcli_base.c:1239:9: warning: Array access (via field 'pending') results in a null pointer dereference <--[clang] req = conn->pending[0]; ^ Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
This commit is contained in:
parent
7b8ec24ccf
commit
7a86c99ccb
@ -1229,7 +1229,8 @@ void smbXcli_conn_disconnect(struct smbXcli_conn *conn, NTSTATUS status)
|
|||||||
* conn->pending because that array changes in
|
* conn->pending because that array changes in
|
||||||
* smbXcli_req_unset_pending.
|
* smbXcli_req_unset_pending.
|
||||||
*/
|
*/
|
||||||
while (talloc_array_length(conn->pending) > 0) {
|
while (conn->pending != NULL &&
|
||||||
|
talloc_array_length(conn->pending) > 0) {
|
||||||
struct tevent_req *req;
|
struct tevent_req *req;
|
||||||
struct smbXcli_req_state *state;
|
struct smbXcli_req_state *state;
|
||||||
struct tevent_req **chain;
|
struct tevent_req **chain;
|
||||||
|
Loading…
Reference in New Issue
Block a user