summaryrefslogtreecommitdiff
path: root/source4/ntvfs
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2016-03-26 02:24:08 +0100
committerMichael Adam <obnox@samba.org>2016-05-13 00:16:15 +0200
commit8f4759d5624850b46be7c0e0e6f1c89a3320605c (patch)
tree8c3cd8a9530e572de0590fb40f923f2ed8869c6f /source4/ntvfs
parentb64a24eb056e2abbc5364bcc01e994e1ccaa9b9f (diff)
downloadsamba-8f4759d5624850b46be7c0e0e6f1c89a3320605c.tar.gz
s4:ntvfs: fix O3 error unused result of asprintf in cifspsx_map_fileinfo
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/vfs_cifs_posix.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source4/ntvfs/cifs_posix_cli/vfs_cifs_posix.c b/source4/ntvfs/cifs_posix_cli/vfs_cifs_posix.c
index d384dbbca05..9c1e6f6ab23 100644
--- a/source4/ntvfs/cifs_posix_cli/vfs_cifs_posix.c
+++ b/source4/ntvfs/cifs_posix_cli/vfs_cifs_posix.c
@@ -209,7 +209,7 @@ static NTSTATUS cifspsx_map_fileinfo(struct ntvfs_module_context *ntvfs,
{
struct cifspsx_dir *dir = NULL;
char *pattern = NULL;
- int i;
+ int i, ret;
const char *s, *short_name;
s = strrchr(unix_path, '/');
@@ -219,8 +219,11 @@ static NTSTATUS cifspsx_map_fileinfo(struct ntvfs_module_context *ntvfs,
short_name = "";
}
- asprintf(&pattern, "%s:*", unix_path);
-
+ ret = asprintf(&pattern, "%s:*", unix_path);
+ if (ret == -1) {
+ return NT_STATUS_NO_MEMORY;
+ }
+
if (pattern) {
dir = cifspsx_list_unix(req, req, pattern);
}