1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-02 09:47:23 +03:00

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>
This commit is contained in:
Michael Adam 2016-03-26 02:46:54 +01:00
parent 8f4759d562
commit fa80f1a937

View File

@ -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) {