diff options
Diffstat (limited to 'nx-X11/programs/Xserver/dix/dixfonts.c')
-rw-r--r-- | nx-X11/programs/Xserver/dix/dixfonts.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/nx-X11/programs/Xserver/dix/dixfonts.c b/nx-X11/programs/Xserver/dix/dixfonts.c index 156bba2d0..fac918963 100644 --- a/nx-X11/programs/Xserver/dix/dixfonts.c +++ b/nx-X11/programs/Xserver/dix/dixfonts.c @@ -1929,11 +1929,14 @@ GetFontPath(int *count, int *length) fpe = font_path_elements[i]; len += fpe->name_length + 1; } - font_path_string = (unsigned char *) xrealloc(font_path_string, len); - if (!font_path_string) - return NULL; + c = realloc(font_path_string, len); + if (c == NULL) { + free(font_path_string); + font_path_string = NULL; + return BadAlloc; + } - c = font_path_string; + font_path_string = c; *length = 0; for (i = 0; i < num_fpes; i++) { fpe = font_path_elements[i]; |