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
a8df7fdd
Commit
a8df7fdd
authored
Oct 24, 2007
by
Andrew Talbot
Committed by
Alexandre Julliard
Oct 25, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xcopy: Fix some memory leaks.
parent
f0c31f2e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
xcopy.c
programs/xcopy/xcopy.c
+6
-2
No files found.
programs/xcopy/xcopy.c
View file @
a8df7fdd
...
...
@@ -507,6 +507,7 @@ static int XCOPY_DoCopy(WCHAR *srcstem, WCHAR *srcspec,
BOOL
copiedFile
=
FALSE
;
DWORD
destAttribs
,
srcAttribs
;
BOOL
skipFile
;
int
ret
=
0
;
/* Allocate some working memory on heap to minimize footprint */
finddata
=
HeapAlloc
(
GetProcessHeap
(),
0
,
sizeof
(
WIN32_FIND_DATA
));
...
...
@@ -718,7 +719,8 @@ static int XCOPY_DoCopy(WCHAR *srcstem, WCHAR *srcspec,
if
(
flags
&
OPT_IGNOREERRORS
)
{
skipFile
=
TRUE
;
}
else
{
return
RC_WRITEERROR
;
ret
=
RC_WRITEERROR
;
goto
cleanup
;
}
}
...
...
@@ -780,12 +782,14 @@ static int XCOPY_DoCopy(WCHAR *srcstem, WCHAR *srcspec,
}
}
cleanup:
/* free up memory */
HeapFree
(
GetProcessHeap
(),
0
,
finddata
);
HeapFree
(
GetProcessHeap
(),
0
,
inputpath
);
HeapFree
(
GetProcessHeap
(),
0
,
outputpath
);
return
0
;
return
ret
;
}
/* =========================================================================
...
...
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