diff options
Diffstat (limited to 'nx-X11/programs')
-rw-r--r-- | nx-X11/programs/Xserver/dix/dixfonts.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/nx-X11/programs/Xserver/dix/dixfonts.c b/nx-X11/programs/Xserver/dix/dixfonts.c index 0d90cd7b0..752a7eb6d 100644 --- a/nx-X11/programs/Xserver/dix/dixfonts.c +++ b/nx-X11/programs/Xserver/dix/dixfonts.c @@ -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,8 +807,7 @@ doListFontsAndAliases(ClientPtr client, LFclosurePtr c) { c->saved = c->current; c->haveSaved = TRUE; - if (c->savedName) - free(c->savedName); + free(c->savedName); c->savedName = (char *)malloc(namelen + 1); if (c->savedName) memmove(c->savedName, name, namelen + 1); @@ -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,8 +1090,7 @@ doListFontsWithInfo(ClientPtr client, LFWIclosurePtr c) c->saved = c->current; c->haveSaved = TRUE; c->savedNumFonts = numFonts; - if (c->savedName) - free(c->savedName); + free(c->savedName); c->savedName = (char *)malloc(namelen + 1); if (c->savedName) memmove(c->savedName, name, namelen + 1); @@ -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; } |