aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2015-12-28 13:08:47 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2015-12-28 13:08:47 +0100
commitf58006d932d907dc13d76084e9171de59ee27f16 (patch)
tree087badad640b4d1fc191a865475fe7a85674d06f /nx-X11/programs/Xserver
parentedce25213ffc81389909c827c9aaac27b736b483 (diff)
parentaea71067dccd63e5988a57944991a2775ae4e5a7 (diff)
downloadnx-libs-f58006d932d907dc13d76084e9171de59ee27f16.tar.gz
nx-libs-f58006d932d907dc13d76084e9171de59ee27f16.tar.bz2
nx-libs-f58006d932d907dc13d76084e9171de59ee27f16.zip
Merge branch 'sunweaver-pr/dixfont-fix' into 3.6.x
Attributes GH PR #58: https://github.com/ArcticaProject/nx-libs/pull/58
Diffstat (limited to 'nx-X11/programs/Xserver')
-rw-r--r--nx-X11/programs/Xserver/dix/dixfonts.c11
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];