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
43e300ec
Commit
43e300ec
authored
Jul 22, 2019
by
Ulrich Sibiller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Colormap.c: use SAFE_free
parent
633d0409
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
Colormap.c
nx-X11/programs/Xserver/hw/nxagent/Colormap.c
+11
-10
No files found.
nx-X11/programs/Xserver/hw/nxagent/Colormap.c
View file @
43e300ec
...
...
@@ -54,6 +54,7 @@ is" without express or implied warranty.
#include "Visual.h"
#include "Windows.h"
#include "Args.h"
#include "Utils.h"
#define PANIC
#define WARNING
...
...
@@ -120,7 +121,7 @@ Bool nxagentCreateColormap(ColormapPtr pCmap)
pCmap
->
red
[
i
].
co
.
local
.
green
=
colors
[
i
].
red
;
pCmap
->
red
[
i
].
co
.
local
.
blue
=
colors
[
i
].
red
;
}
free
(
colors
);
SAFE_
free
(
colors
);
break
;
case
StaticColor
:
/* read only */
...
...
@@ -133,7 +134,7 @@ Bool nxagentCreateColormap(ColormapPtr pCmap)
pCmap
->
red
[
i
].
co
.
local
.
green
=
colors
[
i
].
green
;
pCmap
->
red
[
i
].
co
.
local
.
blue
=
colors
[
i
].
blue
;
}
free
(
colors
);
SAFE_
free
(
colors
);
break
;
case
TrueColor
:
/* read only */
...
...
@@ -157,7 +158,7 @@ Bool nxagentCreateColormap(ColormapPtr pCmap)
pCmap
->
green
[
i
].
co
.
local
.
green
=
colors
[
i
].
green
;
pCmap
->
blue
[
i
].
co
.
local
.
blue
=
colors
[
i
].
blue
;
}
free
(
colors
);
SAFE_
free
(
colors
);
break
;
case
GrayScale
:
/* read and write */
...
...
@@ -176,7 +177,7 @@ Bool nxagentCreateColormap(ColormapPtr pCmap)
void
nxagentDestroyColormap
(
ColormapPtr
pCmap
)
{
XFreeColormap
(
nxagentDisplay
,
nxagentColormap
(
pCmap
));
free
(
pCmap
->
devPriv
);
SAFE_
free
(
pCmap
->
devPriv
);
}
#define SEARCH_PREDICATE \
...
...
@@ -254,10 +255,10 @@ void nxagentSetInstalledColormapWindows(ScreenPtr pScreen)
numWindows
=
0
;
}
free
(
icws
.
cmapIDs
);
SAFE_
free
(
icws
.
cmapIDs
);
if
(
!
nxagentSameInstalledColormapWindows
(
icws
.
windows
,
icws
.
numWindows
))
{
free
(
nxagentOldInstalledColormapWindows
);
SAFE_
free
(
nxagentOldInstalledColormapWindows
);
#ifdef _XSERVER64
{
...
...
@@ -268,7 +269,7 @@ void nxagentSetInstalledColormapWindows(ScreenPtr pScreen)
windows
[
i
]
=
icws
.
windows
[
i
];
XSetWMColormapWindows
(
nxagentDisplay
,
nxagentDefaultWindows
[
pScreen
->
myNum
],
windows
,
numWindows
);
free
(
windows
);
SAFE_
free
(
windows
);
}
#else
XSetWMColormapWindows
(
nxagentDisplay
,
nxagentDefaultWindows
[
pScreen
->
myNum
],
...
...
@@ -317,12 +318,12 @@ void nxagentSetInstalledColormapWindows(ScreenPtr pScreen)
#endif
/* DUMB_WINDOW_MANAGERS */
}
else
free
(
icws
.
windows
);
SAFE_
free
(
icws
.
windows
);
}
void
nxagentSetScreenSaverColormapWindow
(
ScreenPtr
pScreen
)
{
free
(
nxagentOldInstalledColormapWindows
);
SAFE_
free
(
nxagentOldInstalledColormapWindows
);
#ifdef _XSERVER64
{
...
...
@@ -454,7 +455,7 @@ void nxagentStoreColors(ColormapPtr pCmap, int nColors, xColorItem *pColors)
pColors64
[
i
].
flags
=
pColors
[
i
].
flags
;
}
XStoreColors
(
nxagentDisplay
,
nxagentColormap
(
pCmap
),
pColors64
,
nColors
);
free
(
pColors64
);
SAFE_
free
(
pColors64
);
}
#else
XStoreColors
(
nxagentDisplay
,
nxagentColormap
(
pCmap
),
...
...
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