Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
231946c3
Commit
231946c3
authored
May 13, 2004
by
Chris Morgan
Committed by
Alexandre Julliard
May 13, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Free up the original buffer pointer instead of the one we advanced.
Only call getDrive() once inside of addDrive().
parent
917df923
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
10 deletions
+12
-10
drive.c
programs/winecfg/drive.c
+12
-10
No files found.
programs/winecfg/drive.c
View file @
231946c3
...
...
@@ -70,18 +70,20 @@ int getDrive(char letter)
BOOL
addDrive
(
char
letter
,
char
*
targetpath
,
char
*
label
,
char
*
serial
,
uint
type
)
{
if
(
drives
[
getDrive
(
letter
)].
in_use
)
int
driveIndex
=
getDrive
(
letter
);
if
(
drives
[
driveIndex
].
in_use
)
return
FALSE
;
WINE_TRACE
(
"letter == '%c', unixpath == '%s', label == '%s', serial == '%s', type == %d
\n
"
,
letter
,
targetpath
,
label
,
serial
,
type
);
drives
[
getDrive
(
letter
)].
letter
=
toupper
(
letter
);
drives
[
getDrive
(
letter
)
].
unixpath
=
strdup
(
targetpath
);
drives
[
getDrive
(
letter
)].
label
=
strdup
(
label
);
drives
[
getDrive
(
letter
)].
serial
=
strdup
(
serial
);
drives
[
getDrive
(
letter
)].
type
=
type
;
drives
[
getDrive
(
letter
)].
in_use
=
TRUE
;
drives
[
driveIndex
].
letter
=
toupper
(
letter
);
drives
[
driveIndex
].
unixpath
=
strdup
(
targetpath
);
drives
[
driveIndex
].
label
=
strdup
(
label
);
drives
[
driveIndex
].
serial
=
strdup
(
serial
);
drives
[
driveIndex
].
type
=
type
;
drives
[
driveIndex
].
in_use
=
TRUE
;
return
TRUE
;
}
...
...
@@ -696,7 +698,7 @@ void onAddDriveClicked(HWND hDlg) {
void
onDriveInitDialog
(
void
)
{
char
*
pDevices
;
char
*
pDevices
,
*
pDev
;
int
ret
;
int
i
;
int
retval
;
...
...
@@ -704,7 +706,7 @@ void onDriveInitDialog(void)
WINE_TRACE
(
"
\n
"
);
/* setup the drives array */
pDev
ices
=
(
char
*
)
malloc
(
512
);
pDev
=
pDevices
=
malloc
(
512
);
ret
=
GetLogicalDriveStrings
(
512
,
pDevices
);
/* make all devices unused */
...
...
@@ -786,7 +788,7 @@ void onDriveInitDialog(void)
WINE_TRACE
(
"found %d drives
\n
"
,
i
);
free
(
pDev
ices
);
free
(
pDev
);
}
...
...
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