git.samba.org
/
metze
/
samba
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b64a24e
)
s4:ntvfs: fix O3 error unused result of asprintf in cifspsx_map_fileinfo
author
Michael Adam
<obnox@samba.org>
Sat, 26 Mar 2016 01:24:08 +0000
(
02:24
+0100)
committer
Michael Adam
<obnox@samba.org>
Thu, 12 May 2016 22:16:15 +0000
(
00:16
+0200)
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
source4/ntvfs/cifs_posix_cli/vfs_cifs_posix.c
patch
|
blob
|
history
diff --git
a/source4/ntvfs/cifs_posix_cli/vfs_cifs_posix.c
b/source4/ntvfs/cifs_posix_cli/vfs_cifs_posix.c
index d384dbbca058b018cc9ec0fe948ecd7d2ebee978..9c1e6f6ab23c411a074be26948be7e4c33b3c67a 100644
(file)
--- 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);
}