summaryrefslogtreecommitdiff
path: root/source4/ntvfs
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2016-03-26 01:53:00 +0100
committerMichael Adam <obnox@samba.org>2016-05-13 00:16:15 +0200
commit8e521379d598d6ddf2d6967d70381eee2c1968b7 (patch)
tree1634ad834b16295680a0bcda1c0194800928bfd5 /source4/ntvfs
parent2d8a3125f25d108dba1ede497b3878d4025351ef (diff)
downloadsamba-8e521379d598d6ddf2d6967d70381eee2c1968b7.tar.gz
s4:ntvfs: fix O3 error unused result of asprintf
in svfs_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/simple/vfs_simple.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source4/ntvfs/simple/vfs_simple.c b/source4/ntvfs/simple/vfs_simple.c
index 38ecdfe66b3..abd76d25c88 100644
--- a/source4/ntvfs/simple/vfs_simple.c
+++ b/source4/ntvfs/simple/vfs_simple.c
@@ -206,7 +206,7 @@ static NTSTATUS svfs_map_fileinfo(struct ntvfs_module_context *ntvfs,
{
struct svfs_dir *dir = NULL;
char *pattern = NULL;
- int i;
+ int i, ret;
const char *s, *short_name;
s = strrchr(unix_path, '/');
@@ -216,8 +216,11 @@ static NTSTATUS svfs_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 = svfs_list_unix(req, req, pattern);
}