aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/hw/nxagent/Font.c
diff options
context:
space:
mode:
authorReinhard Tartler <siretart@tauware.de>2011-10-10 17:58:57 +0200
committerReinhard Tartler <siretart@tauware.de>2011-10-10 17:58:57 +0200
commite9132da09462b3d2607a97e2f580cbd3144819eb (patch)
tree2dfc6a37f2be48a8e61f37d62565e83be4b73186 /nx-X11/programs/Xserver/hw/nxagent/Font.c
parent6f5e20bc49695159bd3b313333591c4eb27ad422 (diff)
downloadnx-libs-e9132da09462b3d2607a97e2f580cbd3144819eb.tar.gz
nx-libs-e9132da09462b3d2607a97e2f580cbd3144819eb.tar.bz2
nx-libs-e9132da09462b3d2607a97e2f580cbd3144819eb.zip
Imported nxagent-3.4.0-11.tar.gznxagent/3.4.0-11
Summary: Imported nxagent-3.4.0-11.tar.gz Keywords: Imported nxagent-3.4.0-11.tar.gz into Git repository
Diffstat (limited to 'nx-X11/programs/Xserver/hw/nxagent/Font.c')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Font.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Font.c b/nx-X11/programs/Xserver/hw/nxagent/Font.c
index 87f9f0201..13b819322 100644
--- a/nx-X11/programs/Xserver/hw/nxagent/Font.c
+++ b/nx-X11/programs/Xserver/hw/nxagent/Font.c
@@ -1,6 +1,6 @@
/**************************************************************************/
/* */
-/* Copyright (c) 2001, 2007 NoMachine, http://www.nomachine.com/. */
+/* Copyright (c) 2001, 2010 NoMachine, http://www.nomachine.com/. */
/* */
/* NXAGENT, NX protocol compression and NX extensions to this software */
/* are copyright of NoMachine. Redistribution and use of the present */
@@ -9,7 +9,7 @@
/* */
/* Check http://www.nomachine.com/licensing.html for applicability. */
/* */
-/* NX and NoMachine are trademarks of NoMachine S.r.l. */
+/* NX and NoMachine are trademarks of Medialogic S.p.A. */
/* */
/* All rights reserved. */
/* */
@@ -827,7 +827,10 @@ static XFontStruct *nxagentLoadBestQueryFont(Display* dpy, char *fontName, FontP
for (j = 0; j < numSearchFields; j++)
{
- free (searchFields[j]);
+ if (searchFields[j] != NULL)
+ {
+ free(searchFields[j]);
+ }
}
}
}
@@ -846,7 +849,10 @@ static XFontStruct *nxagentLoadBestQueryFont(Display* dpy, char *fontName, FontP
for (j = 0; j < numFontFields; j++)
{
- free (fontNameFields[j]);
+ if (fontNameFields[j] != NULL)
+ {
+ free(fontNameFields[j]);
+ }
}
return fontStruct;
@@ -1765,6 +1771,10 @@ int nxagentSplitString(char *string, char *fields[], int nfields, char *sep)
strncpy(fields[i], current, fieldlen);
*(fields[i] + fieldlen) = 0;
}
+ else
+ {
+ fields[i] = NULL;
+ }
current = next + seplen;