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
efebe8b2
Commit
efebe8b2
authored
Oct 26, 2007
by
Lionel Debroux
Committed by
Alexandre Julliard
Oct 26, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt/tests: Fix memory leak (found by Smatch).
parent
c20bf693
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
7 deletions
+5
-7
string.c
dlls/msvcrt/tests/string.c
+5
-7
No files found.
dlls/msvcrt/tests/string.c
View file @
efebe8b2
...
...
@@ -388,7 +388,7 @@ static void test_strdup(void)
START_TEST
(
string
)
{
void
*
mem
;
char
mem
[
100
]
;
static
const
char
xilstring
[]
=
"c:/xilinx"
;
int
nLen
;
...
...
@@ -401,13 +401,11 @@ START_TEST(string)
/* MSVCRT memcpy behaves like memmove for overlapping moves,
MFC42 CString::Insert seems to rely on that behaviour */
mem
=
malloc
(
100
);
ok
(
mem
!=
NULL
,
"memory not allocated for size 0
\n
"
);
strcpy
((
char
*
)
mem
,
xilstring
);
strcpy
(
mem
,
xilstring
);
nLen
=
strlen
(
xilstring
);
pmemcpy
(
(
char
*
)
mem
+
5
,
mem
,
nLen
+
1
);
ok
(
pmemcmp
(
(
char
*
)
mem
+
5
,
xilstring
,
nLen
)
==
0
,
"Got result %s
\n
"
,
(
char
*
)
mem
+
5
);
pmemcpy
(
mem
+
5
,
mem
,
nLen
+
1
);
ok
(
pmemcmp
(
mem
+
5
,
xilstring
,
nLen
)
==
0
,
"Got result %s
\n
"
,
mem
+
5
);
/* Test _swab function */
test_swab
();
...
...
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