in svfs_map_fileinfo
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Christian Ambach <ambi@samba.org>
{
struct svfs_dir *dir = NULL;
char *pattern = NULL;
- int i;
+ int i, ret;
const char *s, *short_name;
s = strrchr(unix_path, '/');
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);
}