diff options
author | Jeremy Allison <jra@samba.org> | 2013-04-09 10:38:24 -0700 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2013-04-11 09:49:41 -0700 |
commit | 770512e3bd785a977351ba82ab08c556573c79dd (patch) | |
tree | ddef92008220ef20e144d3ba21ae104c6bdaf44b /source3 | |
parent | 7e437a39abaee1133ea4c30e75ef53eb47ca64b6 (diff) | |
download | samba-770512e3bd785a977351ba82ab08c556573c79dd.tar.gz samba-770512e3bd785a977351ba82ab08c556573c79dd.tar.bz2 samba-770512e3bd785a977351ba82ab08c556573c79dd.zip |
Check SMB_VFS_NEXT_OPENDIR return in dirsort_opendir().
Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source3')
-rw-r--r-- | source3/modules/vfs_dirsort.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source3/modules/vfs_dirsort.c b/source3/modules/vfs_dirsort.c index d6f19b52ec..e2c61dab17 100644 --- a/source3/modules/vfs_dirsort.c +++ b/source3/modules/vfs_dirsort.c @@ -114,6 +114,11 @@ static DIR *dirsort_opendir(vfs_handle_struct *handle, data->source_directory = SMB_VFS_NEXT_OPENDIR(handle, fname, mask, attr); + if (data->source_directory == NULL) { + TALLOC_FREE(data); + return NULL; + } + data->fd = dirfd(data->source_directory); if (!open_and_sort_dir(handle, data)) { |