mirror of
https://github.com/samba-team/samba.git
synced 2024-12-27 03:21:53 +03:00
Fix Coverity CID 929. Potential NULL deref after code refactoring.
Jeremy.
This commit is contained in:
parent
d654782806
commit
3036a9c7c1
@ -4649,6 +4649,11 @@ NTSTATUS smbd_do_qfilepathinfo(connection_struct *conn,
|
||||
uint32 lock_pid;
|
||||
enum brl_type lock_type;
|
||||
|
||||
/* We need an open file with a real fd for this. */
|
||||
if (!fsp || fsp->is_directory || fsp->fh->fd == -1) {
|
||||
return NT_STATUS_INVALID_LEVEL;
|
||||
}
|
||||
|
||||
if (lock_data_count != POSIX_LOCK_DATA_SIZE) {
|
||||
return NT_STATUS_INVALID_PARAMETER;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user