aboutsummaryrefslogtreecommitdiff
path: root/fontconfig/src/fcstr.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-06-04 09:40:31 +0200
committermarha <marha@users.sourceforge.net>2012-06-04 09:40:31 +0200
commit63918271b55923e417b14b9e7add4443582cfab3 (patch)
tree59fc1c26991bbdb97d306da11408e98f49e05607 /fontconfig/src/fcstr.c
parent7d6bc8457187e6c4284201b3a6625357c4aca9b4 (diff)
parent1af6fc1b5d93e54d6674de8b5870448b29f139a7 (diff)
downloadvcxsrv-63918271b55923e417b14b9e7add4443582cfab3.tar.gz
vcxsrv-63918271b55923e417b14b9e7add4443582cfab3.tar.bz2
vcxsrv-63918271b55923e417b14b9e7add4443582cfab3.zip
Merge remote-tracking branch 'origin/released'
Diffstat (limited to 'fontconfig/src/fcstr.c')
-rw-r--r--fontconfig/src/fcstr.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fontconfig/src/fcstr.c b/fontconfig/src/fcstr.c
index f20d05e7d..e372af080 100644
--- a/fontconfig/src/fcstr.c
+++ b/fontconfig/src/fcstr.c
@@ -833,6 +833,7 @@ FcStrBufChar (FcStrBuf *buf, FcChar8 c)
if (buf->allocated)
{
size = buf->size * 2;
+ FcMemFree (FC_MEM_STRBUF, buf->size);
new = realloc (buf->buf, size);
}
else
@@ -850,8 +851,6 @@ FcStrBufChar (FcStrBuf *buf, FcChar8 c)
buf->failed = FcTrue;
return FcFalse;
}
- if (buf->size)
- FcMemFree (FC_MEM_STRBUF, buf->size);
FcMemAlloc (FC_MEM_STRBUF, size);
buf->size = size;
buf->buf = new;