diff options
Diffstat (limited to 'nx-X11/programs')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c b/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c index 8b3fdcc8d..50bf719c6 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c +++ b/nx-X11/programs/Xserver/hw/nxagent/NXdixfonts.c @@ -478,7 +478,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); @@ -544,8 +544,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); @@ -663,14 +662,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; } @@ -856,8 +855,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); @@ -983,7 +981,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; } @@ -1201,7 +1199,7 @@ nxdoListFontsAndAliases(client, fss) return TRUE; } if (err == FontNameAlias) { - if (resolved) free(resolved); + free(resolved); resolved = (char *) malloc(resolvedlen + 1); if (resolved) { @@ -1273,8 +1271,7 @@ nxdoListFontsAndAliases(client, fss) { 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) { @@ -1370,7 +1367,7 @@ finish: 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(c->names); #else @@ -1378,7 +1375,7 @@ finish: #endif /* HAS_XFONT2 */ free(c); free(fss); - if (resolved) free(resolved); + free(resolved); return doOpenFont(client, oc); } |