Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
b2d38f15
Commit
b2d38f15
authored
Jul 14, 2020
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Use malloc() to allocate the buffer in get_device_mount_point().
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
9ec5be2c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
file.c
dlls/ntdll/unix/file.c
+5
-7
No files found.
dlls/ntdll/unix/file.c
View file @
b2d38f15
...
...
@@ -947,8 +947,7 @@ static char *get_device_mount_point( dev_t dev )
if
(
device
&&
!
stat
(
device
,
&
st
)
&&
S_ISBLK
(
st
.
st_mode
)
&&
st
.
st_rdev
==
dev
)
{
ret
=
RtlAllocateHeap
(
GetProcessHeap
(),
0
,
strlen
(
entry
->
mnt_dir
)
+
1
);
if
(
ret
)
strcpy
(
ret
,
entry
->
mnt_dir
);
ret
=
strdup
(
entry
->
mnt_dir
);
break
;
}
}
...
...
@@ -968,8 +967,7 @@ static char *get_device_mount_point( dev_t dev )
if
(
stat
(
entry
[
i
].
f_mntfromname
,
&
st
)
==
-
1
)
continue
;
if
(
S_ISBLK
(
st
.
st_mode
)
&&
st
.
st_rdev
==
dev
)
{
ret
=
RtlAllocateHeap
(
GetProcessHeap
(),
0
,
strlen
(
entry
[
i
].
f_mntonname
)
+
1
);
if
(
ret
)
strcpy
(
ret
,
entry
[
i
].
f_mntonname
);
ret
=
strdup
(
entry
[
i
].
f_mntonname
);
break
;
}
}
...
...
@@ -1089,11 +1087,11 @@ static int get_dir_case_sensitivity_attr( const char *dir )
attr
.
volattr
=
ATTR_VOL_INFO
|
ATTR_VOL_CAPABILITIES
;
if
(
getattrlist
(
mntpoint
,
&
attr
,
&
caps
,
sizeof
(
caps
),
0
)
<
0
)
{
RtlFreeHeap
(
GetProcessHeap
(),
0
,
mntpoint
);
free
(
mntpoint
);
add_fs_cache
(
get_fsid
.
dev
,
get_fsid
.
fsid
,
TRUE
);
return
TRUE
;
}
RtlFreeHeap
(
GetProcessHeap
(),
0
,
mntpoint
);
free
(
mntpoint
);
if
(
caps
.
size
==
sizeof
(
caps
)
&&
(
caps
.
caps
.
valid
[
VOL_CAPABILITIES_FORMAT
]
&
(
VOL_CAP_FMT_CASE_SENSITIVE
|
VOL_CAP_FMT_CASE_PRESERVING
))
==
...
...
@@ -3500,7 +3498,7 @@ static NTSTATUS unmount_device( HANDLE handle )
if
(
major
(
st
.
st_rdev
)
==
LOOP_MAJOR
)
ioctl
(
unix_fd
,
0x4c01
/*LOOP_CLR_FD*/
,
0
);
#endif
}
RtlFreeHeap
(
GetProcessHeap
(),
0
,
mount_point
);
free
(
mount_point
);
}
}
if
(
needs_close
)
close
(
unix_fd
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment