diff options
author | marha <marha@users.sourceforge.net> | 2012-06-04 09:40:31 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-06-04 09:40:31 +0200 |
commit | 63918271b55923e417b14b9e7add4443582cfab3 (patch) | |
tree | 59fc1c26991bbdb97d306da11408e98f49e05607 /fontconfig/src/fcxml.c | |
parent | 7d6bc8457187e6c4284201b3a6625357c4aca9b4 (diff) | |
parent | 1af6fc1b5d93e54d6674de8b5870448b29f139a7 (diff) | |
download | vcxsrv-63918271b55923e417b14b9e7add4443582cfab3.tar.gz vcxsrv-63918271b55923e417b14b9e7add4443582cfab3.tar.bz2 vcxsrv-63918271b55923e417b14b9e7add4443582cfab3.zip |
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'fontconfig/src/fcxml.c')
-rw-r--r-- | fontconfig/src/fcxml.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/fontconfig/src/fcxml.c b/fontconfig/src/fcxml.c index 799352e6f..343208617 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) @@ -1868,12 +1869,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; @@ -1938,7 +1941,7 @@ FcParseDir (FcConfigParse *parse) bail: if (prefix) - free (prefix); + FcStrFree (prefix); } static void @@ -1961,12 +1964,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; @@ -2057,12 +2062,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; @@ -2080,7 +2087,7 @@ FcParseInclude (FcConfigParse *parse) bail: if (prefix) - free (prefix); + FcStrFree (prefix); } typedef struct _FcOpMap { |