diff options
author | Michael Adam <obnox@samba.org> | 2016-03-26 02:46:54 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2016-05-13 00:16:15 +0200 |
commit | fa80f1a937b699bf93ceee85cd033424f6987b29 (patch) | |
tree | cf5bf452d5ef67e212d5d7cdca2dd78362597079 /source4/ntvfs | |
parent | 8f4759d5624850b46be7c0e0e6f1c89a3320605c (diff) | |
download | samba-fa80f1a937b699bf93ceee85cd033424f6987b29.tar.gz |
s4:ntvfs: fix O3 error unused result of asprintf in cifspsx_list_unix
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
Diffstat (limited to 'source4/ntvfs')
-rw-r--r-- | source4/ntvfs/cifs_posix_cli/svfs_util.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source4/ntvfs/cifs_posix_cli/svfs_util.c b/source4/ntvfs/cifs_posix_cli/svfs_util.c index f351c5840ea..a9e6ba49925 100644 --- a/source4/ntvfs/cifs_posix_cli/svfs_util.c +++ b/source4/ntvfs/cifs_posix_cli/svfs_util.c @@ -94,6 +94,7 @@ struct cifspsx_dir *cifspsx_list_unix(TALLOC_CTX *mem_ctx, struct ntvfs_request unsigned int i = dir->count; char *full_name; char *low_name; + int ret; if (strchr(dent->d_name, ':') && !strchr(unix_path, ':')) { /* don't show streams in dir listing */ @@ -120,7 +121,11 @@ struct cifspsx_dir *cifspsx_list_unix(TALLOC_CTX *mem_ctx, struct ntvfs_request dir->files[i].name = low_name; if (!dir->files[i].name) { continue; } - asprintf(&full_name, "%s/%s", dir->unix_dir, dir->files[i].name); + ret = asprintf(&full_name, "%s/%s", dir->unix_dir, dir->files[i].name); + if (ret == -1) { + continue; + } + if (!full_name) { continue; } if (stat(full_name, &dir->files[i].st) == 0) { |