aboutsummaryrefslogtreecommitdiff
path: root/fontconfig/src/fcxml.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-06-04 09:21:39 +0200
committermarha <marha@users.sourceforge.net>2012-06-04 09:21:39 +0200
commit1af6fc1b5d93e54d6674de8b5870448b29f139a7 (patch)
tree83c0d1097657f08544c154d5ba6c820c1fb67e78 /fontconfig/src/fcxml.c
parente4580373a81894c451e5933b24906a075828b77e (diff)
downloadvcxsrv-1af6fc1b5d93e54d6674de8b5870448b29f139a7.tar.gz
vcxsrv-1af6fc1b5d93e54d6674de8b5870448b29f139a7.tar.bz2
vcxsrv-1af6fc1b5d93e54d6674de8b5870448b29f139a7.zip
fontconfig libX11 libXft mesa pixman xserver xkeyboard-config git update 4
May 2012
Diffstat (limited to 'fontconfig/src/fcxml.c')
-rw-r--r--fontconfig/src/fcxml.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/fontconfig/src/fcxml.c b/fontconfig/src/fcxml.c
index d92cbcc66..5201b3c04 100644
--- a/fontconfig/src/fcxml.c
+++ b/fontconfig/src/fcxml.c
@@ -1359,6 +1359,7 @@ FcParseRange (FcConfigParse *parse)
break;
default:
FcConfigMessage (parse, FcSevereError, "invalid element in range");
+ n = 0;
break;
}
if (count == 1)
@@ -1864,12 +1865,14 @@ FcParseDir (FcConfigParse *parse)
size_t plen = strlen ((const char *)prefix);
size_t dlen = strlen ((const char *)data);
+ FcMemFree (FC_MEM_STRING, plen + 1);
prefix = realloc (prefix, plen + 1 + dlen + 1);
if (!prefix)
{
FcConfigMessage (parse, FcSevereError, "out of memory");
goto bail;
}
+ FcMemAlloc (FC_MEM_STRING, plen + 1 + dlen + 1);
prefix[plen] = FC_DIR_SEPARATOR;
memcpy (&prefix[plen + 1], data, dlen);
prefix[plen + 1 + dlen] = 0;
@@ -1934,7 +1937,7 @@ FcParseDir (FcConfigParse *parse)
bail:
if (prefix)
- free (prefix);
+ FcStrFree (prefix);
}
static void
@@ -1957,12 +1960,14 @@ FcParseCacheDir (FcConfigParse *parse)
size_t plen = strlen ((const char *)prefix);
size_t dlen = strlen ((const char *)data);
+ FcMemFree (FC_MEM_STRING, plen + 1);
prefix = realloc (prefix, plen + 1 + dlen + 1);
if (!prefix)
{
FcConfigMessage (parse, FcSevereError, "out of memory");
goto bail;
}
+ FcMemAlloc (FC_MEM_STRING, plen + 1 + dlen + 1);
prefix[plen] = FC_DIR_SEPARATOR;
memcpy (&prefix[plen + 1], data, dlen);
prefix[plen + 1 + dlen] = 0;
@@ -2053,12 +2058,14 @@ FcParseInclude (FcConfigParse *parse)
size_t plen = strlen ((const char *)prefix);
size_t dlen = strlen ((const char *)s);
+ FcMemFree (FC_MEM_STRING, plen + 1);
prefix = realloc (prefix, plen + 1 + dlen + 1);
if (!prefix)
{
FcConfigMessage (parse, FcSevereError, "out of memory");
goto bail;
}
+ FcMemAlloc (FC_MEM_STRING, plen + 1 + dlen + 1);
prefix[plen] = FC_DIR_SEPARATOR;
memcpy (&prefix[plen + 1], s, dlen);
prefix[plen + 1 + dlen] = 0;
@@ -2076,7 +2083,7 @@ FcParseInclude (FcConfigParse *parse)
bail:
if (prefix)
- free (prefix);
+ FcStrFree (prefix);
}
typedef struct _FcOpMap {