Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nx-libs
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
dimbor
nx-libs
Commits
9b56675d
Commit
9b56675d
authored
Jan 25, 2020
by
Ulrich Sibiller
Committed by
Mike Gabriel
May 07, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rootless.c: fix common realloc mistake
As reported by static analyzer: (error) Common realloc mistake: 'ptr' nulled but not freed upon failure Attributes ArcticaProject/nx-libs#905
parent
434d5085
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
Rootless.c
nx-X11/programs/Xserver/hw/nxagent/Rootless.c
+1
-2
No files found.
nx-X11/programs/Xserver/hw/nxagent/Rootless.c
View file @
9b56675d
...
...
@@ -151,10 +151,9 @@ void nxagentRootlessAddTopLevelWindow(WindowPtr pWin, Window w)
if
(
topLevelParentMap
.
next
==
topLevelParentMap
.
size
)
{
TopLevelParentRec
*
ptr
=
topLevelParentMap
.
elt
;
size_t
size
=
(
topLevelParentMap
.
size
+=
TOP_LEVEL_TABLE_UNIT
);
ptr
=
realloc
(
ptr
,
size
*
sizeof
(
TopLevelParentRec
));
TopLevelParentRec
*
ptr
=
realloc
(
topLevelParentMap
.
elt
,
size
*
sizeof
(
TopLevelParentRec
));
if
(
ptr
==
NULL
)
{
...
...
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