aboutsummaryrefslogtreecommitdiff
path: root/nx-X11
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11')
-rw-r--r--nx-X11/lib/X11/omGeneric.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/nx-X11/lib/X11/omGeneric.c b/nx-X11/lib/X11/omGeneric.c
index dbddc8415..1b017cb21 100644
--- a/nx-X11/lib/X11/omGeneric.c
+++ b/nx-X11/lib/X11/omGeneric.c
@@ -1910,8 +1910,10 @@ read_EncodingInfo(
} else
len = strlen(buf);
font_data->name = (char *) Xmalloc(len + 1);
- if (font_data->name == NULL)
+ if (font_data->name == NULL) {
+ Xfree(font_data);
return NULL;
+ }
strncpy(font_data->name, buf,len);
font_data->name[len] = 0;
if (bufptr && _XlcCompareISOLatin1(bufptr, "GL") == 0)