Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
52320a47
Commit
52320a47
authored
28 years ago
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(do_error, do_warning): Fix memory leak.
From-SVN: r13752
parent
982ce905
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
gcc/cccp.c
+2
-2
gcc/cpplib.c
+2
-2
No files found.
gcc/cccp.c
View file @
52320a47
...
...
@@ -6721,7 +6721,7 @@ do_error (buf, limit, op, keyword)
struct
directive
*
keyword
;
{
int
length
=
limit
-
buf
;
U_CHAR
*
copy
=
(
U_CHAR
*
)
xmalloc
(
length
+
1
);
U_CHAR
*
copy
=
(
U_CHAR
*
)
alloca
(
length
+
1
);
bcopy
((
char
*
)
buf
,
(
char
*
)
copy
,
length
);
copy
[
length
]
=
0
;
SKIP_WHITE_SPACE
(
copy
);
...
...
@@ -6740,7 +6740,7 @@ do_warning (buf, limit, op, keyword)
struct
directive
*
keyword
;
{
int
length
=
limit
-
buf
;
U_CHAR
*
copy
=
(
U_CHAR
*
)
xmalloc
(
length
+
1
);
U_CHAR
*
copy
=
(
U_CHAR
*
)
alloca
(
length
+
1
);
bcopy
((
char
*
)
buf
,
(
char
*
)
copy
,
length
);
copy
[
length
]
=
0
;
SKIP_WHITE_SPACE
(
copy
);
...
...
This diff is collapsed.
Click to expand it.
gcc/cpplib.c
View file @
52320a47
...
...
@@ -3880,7 +3880,7 @@ do_error (pfile, keyword, buf, limit)
U_CHAR
*
buf
,
*
limit
;
{
int
length
=
limit
-
buf
;
U_CHAR
*
copy
=
(
U_CHAR
*
)
xmalloc
(
length
+
1
);
U_CHAR
*
copy
=
(
U_CHAR
*
)
alloca
(
length
+
1
);
bcopy
(
buf
,
copy
,
length
);
copy
[
length
]
=
0
;
SKIP_WHITE_SPACE
(
copy
);
...
...
@@ -3901,7 +3901,7 @@ do_warning (pfile, keyword, buf, limit)
U_CHAR
*
buf
,
*
limit
;
{
int
length
=
limit
-
buf
;
U_CHAR
*
copy
=
(
U_CHAR
*
)
xmalloc
(
length
+
1
);
U_CHAR
*
copy
=
(
U_CHAR
*
)
alloca
(
length
+
1
);
bcopy
(
buf
,
copy
,
length
);
copy
[
length
]
=
0
;
SKIP_WHITE_SPACE
(
copy
);
...
...
This diff is collapsed.
Click to expand it.
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