mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
CID 1416478: de-ref NULL value in fruit_pwrite_rsrc
Signed-off-by: Swen Schillig <swen@vnet.ibm.com> Reviewed-by: Christof Schmitt <cs@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
This commit is contained in:
parent
15fa8f9f24
commit
c0e4818d68
@ -4405,6 +4405,11 @@ static ssize_t fruit_pwrite_rsrc(vfs_handle_struct *handle,
|
||||
struct fio *fio = (struct fio *)VFS_FETCH_FSP_EXTENSION(handle, fsp);
|
||||
ssize_t nwritten;
|
||||
|
||||
if (fio == NULL) {
|
||||
DBG_ERR("Failed to fetch fsp extension");
|
||||
return -1;
|
||||
}
|
||||
|
||||
switch (fio->config->rsrc) {
|
||||
case FRUIT_RSRC_STREAM:
|
||||
nwritten = fruit_pwrite_rsrc_stream(handle, fsp, data, n, offset);
|
||||
|
Loading…
Reference in New Issue
Block a user