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
59e46dc5
Commit
59e46dc5
authored
Jul 03, 2018
by
Mike Gabriel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dix/dixfonts.c: free() can handle NULL
so let's remove some superflous tests
parent
a2008b28
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
dixfonts.c
nx-X11/programs/Xserver/dix/dixfonts.c
+4
-6
No files found.
nx-X11/programs/Xserver/dix/dixfonts.c
View file @
59e46dc5
...
...
@@ -741,7 +741,7 @@ doListFontsAndAliases(ClientPtr client, LFclosurePtr c)
return
TRUE
;
}
if
(
err
==
FontNameAlias
)
{
if
(
resolved
)
free
(
resolved
);
free
(
resolved
);
resolved
=
(
char
*
)
malloc
(
resolvedlen
+
1
);
if
(
resolved
)
memmove
(
resolved
,
tmpname
,
resolvedlen
+
1
);
...
...
@@ -807,7 +807,6 @@ doListFontsAndAliases(ClientPtr client, LFclosurePtr c)
{
c
->
saved
=
c
->
current
;
c
->
haveSaved
=
TRUE
;
if
(
c
->
savedName
)
free
(
c
->
savedName
);
c
->
savedName
=
(
char
*
)
malloc
(
namelen
+
1
);
if
(
c
->
savedName
)
...
...
@@ -904,14 +903,14 @@ bail:
for
(
i
=
0
;
i
<
c
->
num_fpes
;
i
++
)
FreeFPE
(
c
->
fpe_list
[
i
]);
free
(
c
->
fpe_list
);
if
(
c
->
savedName
)
free
(
c
->
savedName
);
free
(
c
->
savedName
);
#ifdef HAS_XFONT2
xfont2_free_font_names
(
names
);
#else
FreeFontNames
(
names
);
#endif
/* HAS_XFONT2 */
free
(
c
);
if
(
resolved
)
free
(
resolved
);
free
(
resolved
);
return
TRUE
;
}
...
...
@@ -1091,7 +1090,6 @@ doListFontsWithInfo(ClientPtr client, LFWIclosurePtr c)
c
->
saved
=
c
->
current
;
c
->
haveSaved
=
TRUE
;
c
->
savedNumFonts
=
numFonts
;
if
(
c
->
savedName
)
free
(
c
->
savedName
);
c
->
savedName
=
(
char
*
)
malloc
(
namelen
+
1
);
if
(
c
->
savedName
)
...
...
@@ -1203,7 +1201,7 @@ bail:
FreeFPE
(
c
->
fpe_list
[
i
]);
free
(
c
->
reply
);
free
(
c
->
fpe_list
);
if
(
c
->
savedName
)
free
(
c
->
savedName
);
free
(
c
->
savedName
);
free
(
c
);
return
TRUE
;
}
...
...
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